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
Update google_checks.xml to have the SuppressionCommentFilter and SuppressWarningsHolder modules in the config by default (and by extension, SuppressWarningsFilter) #11655
Comments
…annotations and comments
@ddcprg please remove all modules from your config that are not related to this issue to make your example easier to read and understand. |
@nick-mancuso I've updated the config to show the relevant bits only |
@ddcprg to be clear, you would like google_checks.xml to have the SuppressionCommentFilter and SuppressWarningsHolder modules in the config by default (and by extension, SuppressWarningsFilter), correct? |
that's correct @nick-mancuso I've raised PR even though the ticket hasn't been approved #11656 |
@ddcprg please update issue title to be more along the lines of #11655 (comment), make sure to mention modules you want and google_checks.xml, please. |
@nick-mancuso thanks, copy&pasted now - almost |
…annotations and comments
Users should be able to suppress violations in way they want. checkstyle/config/checkstyle_checks.xml Line 577 in 74747a2
|
Approved, in PR for this issue, we should do:
|
thanks @nick-mancuso @romani I'll include the additional module and fix the PR |
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
…annotations and comments
Fix was merged. |
I have downloaded the latest cli from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
How it works Now:
After using
@SuppressWarnings
Using special comments to switch checkstyle off and on:
Is your feature request related to a problem? Please describe.
No, this is just additional config in
google_checks.xml
.Describe the solution you'd like
Add the ability to suppress style checks via annotations and special comments around the code. This will offer users alternatives to suppress checks other than using XML.
Additional context
Some of these changes have been already adopted by Google https://github.com/GoogleCloudPlatform/java-repo-tools/blob/main/third_party/checkstyle/google_checks.xml
References
The text was updated successfully, but these errors were encountered: