spotbugs / spotbugs-maven-plugin

Maven Mojo Plug-In to generate reports based on the SpotBugs Analyzer
https://spotbugs.github.io/spotbugs-maven-plugin/
Apache License 2.0
79 stars 54 forks source link

After recent updates in core libraries ad plugin `verify` and `spotbugs:check` works differently #806

Open romani opened 6 months ago

romani commented 6 months ago

before https://github.com/spotbugs/spotbugs/issues/2759 and https://github.com/spotbugs/spotbugs/issues/2819

we did not notice problem that mvn verify and mvn clean test-compile spotbugs:check works differently. Due to issues above we disabled mvn clean test-compile spotbugs:check in CI, after activation back we noticed that spotbugs reports violation, I checked on local - same violations: https://github.com/checkstyle/checkstyle/pull/14863

Other CIs are green, and mvn verify on local report 0 violation.

violation from mvn clean test-compile spotbugs:check is false positives:

[ERROR] High: Nullcheck of valuesStream at line 1056 of value previously dereferenced in com.puppycrawl.tools.checkstyle.site.SiteUtil.getStringArrayPropertyValue(String, Object) [com.puppycrawl.tools.checkstyle.site.SiteUtil, com.puppycrawl.tools.checkstyle.site.SiteUtil] At SiteUtil.java:[line 1056]Redundant null check at SiteUtil.java:[line 1059] RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

[ERROR] Low: Method com.puppycrawl.tools.checkstyle.utils.JavadocUtil.getJavadocTags(TextBlock, JavadocUtil$JavadocTagType) appears to call the same method on the same object redundantly [com.puppycrawl.tools.checkstyle.utils.JavadocUtil] At JavadocUtil.java:[line 119] PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS

[ERROR] Low: Method com.puppycrawl.tools.checkstyle.utils.JavadocUtil.getJavadocTags(TextBlock, JavadocUtil$JavadocTagType) appears to call the same method on the same object redundantly [com.puppycrawl.tools.checkstyle.utils.JavadocUtil] At JavadocUtil.java:[line 123] PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS

[ERROR] Medium: Method com.puppycrawl.tools.checkstyle.Main.main(String[]) has abnormal exit from finally block [com.puppycrawl.tools.checkstyle.Main] At Main.java:[line 155] AFBR_ABNORMAL_FINALLY_BLOCK_RETURN