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

SuppressWarnings annotation support #462

Closed
g4s8 opened this issue Jun 29, 2020 · 3 comments · Fixed by #504
Closed

SuppressWarnings annotation support #462

g4s8 opened this issue Jun 29, 2020 · 3 comments · Fixed by #504
Assignees

Comments

@g4s8
Copy link

g4s8 commented Jun 29, 2020

JDK has source annotation to suppress any warnings: @SupressWarnings: https://docs.oracle.com/javase/8/docs/api/java/lang/SuppressWarnings.html Many linters (like javac or PMD) suppores this annotation to ignore warning, e.g.

@SuppressWarnings("PMD.ProhibitPublicStaticMethods")
public static void foo() { }

In java code will suppress public static method PMD warning. It's the standard way to ignore warnings for Java linters and checkers.

I'd suggest supporting this annotation for Aibolit to suppress warnings for classes methods and variables, it may use "aibolit" prefix to separate from other suppression, like:

@SuppressWarnings("aibolit.P22")
public void foo(byte[] array) { }
@0crat
Copy link
Collaborator

0crat commented Jun 29, 2020

@acheshkov/z please, pay attention to this issue

@yegor256
Copy link
Member

yegor256 commented Jul 1, 2020

@acheshkov @g4s8 definitely a feature we need!

@lyriccoder lyriccoder self-assigned this Jul 7, 2020
@0crat
Copy link
Collaborator

0crat commented Jul 7, 2020

I'm not managing cqfn/aibolit GitHub repository, you have to contact me in Slack first, see §11

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

Successfully merging a pull request may close this issue.

4 participants