amaembo / huntbugs

Java bytecode static analyzer
Apache License 2.0
304 stars 32 forks source link

Respect @SuppressWarnings("all") #22

Closed leventov closed 8 years ago

amaembo commented 8 years ago

It should work, but to use it, you have to implement custom annotation starting with Suppress and anding with Warning. I suggest this:

@interface SuppressHuntBugsWarning {
  String value();
}

And use it @SuppressHuntBugsWarning("all") or @SuppressHuntBugsWarning("*").

Standard java.lang.SuppressWarnings does not work, because it has source retention, so it does not appear in bytecode.

leventov commented 8 years ago

Thanks @amaembo. FindBugs's SuppressFBWarnings will work?

amaembo commented 8 years ago

Seems unlikely due to ending -s. If you want to reuse it, consider posting a pull-request to support Suppress...Warnings annotations as well.