This repository was archived by the owner on Mar 18, 2025. It is now read-only.
add checkstyle example usage#11
Open
juliawxu wants to merge 1 commit into
Open
Conversation
helenuria
reviewed
Apr 29, 2021
| <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"/> |
Contributor
There was a problem hiding this comment.
where do the exceptions come in?
Contributor
There was a problem hiding this comment.
Looks like it would be "suppressions" - https://checkstyle.sourceforge.io/config_filters.html#SuppressionFilter
helenuria
reviewed
Apr 29, 2021
| To completely disable a check, just comment it out or delete it from the file. | ||
|
|
||
| Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov. | ||
| --> |
Contributor
There was a problem hiding this comment.
should probably rm this comment
helenuria
reviewed
Apr 29, 2021
| <!-- 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)"/> |
Contributor
There was a problem hiding this comment.
would configuring go/inclusive-code be a step in the readme?
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.