Skip to content
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
mainfrom
julia/add-checkstyle-example-usage
Open

add checkstyle example usage#11
juliawxu wants to merge 1 commit into
mainfrom
julia/add-checkstyle-example-usage

Conversation

@juliawxu

Copy link
Copy Markdown

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.

Comment thread java/checkstyle.xml
<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
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread java/checkstyle.xml
To completely disable a check, just comment it out or delete it from the file.

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

Copy link
Copy Markdown
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

Comment thread java/checkstyle.xml
<!-- 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
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants