Java icon indicating copy to clipboard operation
Java copied to clipboard

chore: configure SpotBugs plugin `fb-contrib`

Open vil02 opened this issue 1 year ago • 1 comments

This PR configures fb-contrib.

Continuation of #5122.

  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized it.
  • [x] All filenames are in PascalCase.
  • [x] All functions and variable names follow Java naming conventions.
  • [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

vil02 avatar Apr 29 '24 15:04 vil02

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 37.37%. Comparing base (dda3c9c) to head (6299474).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5126   +/-   ##
=========================================
  Coverage     37.37%   37.37%           
- Complexity     2350     2351    +1     
=========================================
  Files           517      517           
  Lines         15613    15613           
  Branches       2968     2968           
=========================================
+ Hits           5835     5836    +1     
  Misses         9490     9490           
+ Partials        288      287    -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 29 '24 15:04 codecov-commenter

@vil02 Could you tell me why you added all of this? I am not aware of it. Could you explain it to me?

The changes in pom.xml add the fb-contrib plugin to SpotBugs. The changes in spotbugs-exclude.xml ignore some of the checks (i.e. if they were not ignored, then SpotBugs would report problems and the whole CI would fail).

SpotBugs is a static analysis tool for Java. It will help us with the code reviews (so we could focus on important stuff like general design). More checks makes the analysis more restrictive. The size of spotbugs-exclude.xml shows how much technical debt we have in our repository. My long term strategy is to remove as much rules from the ignore list as possible.

I had a brief look on some of the rules, and they are really valuable. It is a pity that this was not present from the very beginning.

vil02 avatar May 01 '24 14:05 vil02