Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add checkstyle example usage #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

juliawxu
Copy link

Add checkstyle.xml file with rules configured with inclusive code regex - definitely a WIP and would love to hear if others know how to be able to use the inclusive code regex specified in the YML file instead, or if other improvements can be made.

<module name="TreeWalker">
<module name="RegexpOnFilename">
<!-- For inclusive code -->
<property name="fileNamePattern" value="(?i)white[-_ ]*list|black[-_ ]*list|master|slave|redline|grandfathered|sanity[-_ ]*check|crippled|dummy|man[-_ ]*in[-_ ]*the[-_ ]*middle|first[-_ ]*class[-_ ]*citizen"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do the exceptions come in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To completely disable a check, just comment it out or delete it from the file.

Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably rm this comment

<!-- For inclusive code -->
<property name="format" value="(?i)white[-_ ]*list|black[-_ ]*list|master|slave|redline|grandfathered|sanity[-_ ]*check|crippled|dummy|man[-_ ]*in[-_ ]*the[-_ ]*middle|first[-_ ]*class[-_ ]*citizen"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Non-inclusive language (see go/inclusive-code for more information)"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would configuring go/inclusive-code be a step in the readme?

@helenuria
Copy link
Contributor

I think its worth investigating how to import regex from a config file. We'd also want to make sure we add a readme me for the directory about usage, and note that because users would have to copy paste the code in, theyd need to check back for updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants