[ISSUE #14469] Enable SpotBugs check enforcement in CI#14470
[ISSUE #14469] Enable SpotBugs check enforcement in CI#14470KomachiSion merged 1 commit intoalibaba:developfrom
Conversation
|
Welcome to create issues to solve the found bugs which not in generated classes or import classes. |
|
Thanks for the suggestion! I will create separate issues for the existing bugs found by SpotBugs (excluding generated/imported classes) and fix them in follow-up PRs. The plan is to remove the pattern exclusions from |
|
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
bf29571 to
d4225f5
Compare
|
Force-pushed to add the Apache License header to |
|
|
|
The CI failure is due to a flaky test ( @KomachiSion Could you please re-run the failed CI job? Thanks! |
- Fix property typo: soptbugs-maven-plugin.version → spotbugs-maven-plugin.version - Add SpotBugs plugin configuration with effort=Max and threshold=High - Create style/spotbugs-exclude.xml to exclude generated code and 14 existing High-level bug patterns (ratchet approach) - Switch CI from spotbugs:spotbugs to spotbugs:check for build failure on new High-priority bugs - Update PR template from findbugs:findbugs to spotbugs:check Fixes alibaba#14469 Signed-off-by: cxhello <caixiaohuichn@gmail.com>
d4225f5 to
a11f386
Compare
|
|
Fixes #14469
What is the purpose of the change
Following the removal of p3c-pmd in #14455, SpotBugs is the only static bug detection tool remaining. However, it was configured but not enforced — CI used
spotbugs:spotbugs(report only), so detected bugs never blocked builds.This PR enables
spotbugs:checkenforcement using a ratchet approach: suppress all existing High-level issues via an exclude filter, so new code introducing novel High-priority bug types will be blocked immediately. Existing issues will be fixed in follow-up PRs by gradually removing exclusions.Brief changelog
soptbugs-maven-plugin.version→spotbugs-maven-plugin.version<configuration>witheffort=Max,threshold=High, andexcludeFilterFilestyle/spotbugs-exclude.xml— excludes generated/ported code (istio, protobuf, packagescan) and 14 existing High-level bug patternsspotbugs:spotbugstospotbugs:checkfindbugs:findbugstospotbugs:checkVerifying this change
mvn compile spotbugs:check -DskipTests -Drat.skip=truepasses (all 46 modules SUCCESS)