spotbugs / discuss

SpotBugs mailing list
6 stars 1 forks source link

Exclude class from analysis (not just report) #71

Closed lwrage closed 5 years ago

lwrage commented 5 years ago

It seems the exclude filters just exclude bugs from the report, i.e., an excluded class is fully analyzed but any found bugs are not reported. Is this correct? Background: I have one very large class (1an Xtext-generated ANTLR parser, 109000 lines of Java, 875KB class file) in my project. Analyzing this class takes about 15 minutes, the rest of the project is done after 3 minutes. Is there any way to completely exclude this class from the analysis?

KengoTODA commented 5 years ago

use -onlyAnalyze option that limits target to analyze.

https://spotbugs.readthedocs.io/en/latest/running.html#text-ui-options

lwrage commented 5 years ago

Unfortunately that option has it backwards. To use it I need to add a long list of packages/classes instead of just listing the one class to exclude.

KengoTODA commented 5 years ago

Yes. Plz consider to share your patch to fix it :)