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

Fix request: example is missing for UsingSuppressWarnings #549

Open
stokpop opened this issue Mar 3, 2025 · 1 comment
Open

Fix request: example is missing for UsingSuppressWarnings #549

stokpop opened this issue Mar 3, 2025 · 1 comment
Assignees

Comments

@stokpop
Copy link
Collaborator

stokpop commented Mar 3, 2025

Give example how to use SuppressWarning correctly.

Also add an item for this to the markdown documentation.

@stokpop
Copy link
Collaborator Author

stokpop commented Mar 5, 2025

There are multiple ways:

  • //NOPMD
  • //NOSONAR
  • @SuppressWarning

Good practice to add reason and rule id.

Using the intellij plugin "suppress" option generates a comment like:

//NOPMD - suppressed AvoidExposingMutableRecordState - TODO explain reason for suppression

Check this: NOPMD does not work for Sonar suppression?

@stokpop stokpop self-assigned this Mar 11, 2025
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

No branches or pull requests

1 participant