-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
<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"/> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it would be "suppressions" - https://checkstyle.sourceforge.io/config_filters.html#SuppressionFilter
To completely disable a check, just comment it out or delete it from the file. | ||
|
||
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov. | ||
--> |
There was a problem hiding this comment.
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)"/> |
There was a problem hiding this comment.
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?
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 |
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.