spotbugs / discuss

SpotBugs mailing list
6 stars 1 forks source link

How to Use SpotBugs in Github Pull requests ? #91

Closed PradeepShetty14 closed 4 years ago

PradeepShetty14 commented 4 years ago

Is there a plugin which can be integrated with github ?

lasselindqvist commented 4 years ago

That depends on your CI system and needs. For example Jenkins has a plugin for publishing the results from Spotbugs. Spotbugs itself doesn't provide such things.

PradeepShetty14 commented 4 years ago

We want to integrate the spotbugs to the git hub PR process, Idea is to examine the code before the code is committed to the master branch. is there any limitation?

lasselindqvist commented 4 years ago

That depends on your build system. One way is to use the Maven plugin for Spotbugs to fail the build on errors (https://spotbugs.github.io/spotbugs-maven-plugin/check-mojo.html#failOnError).

PradeepShetty14 commented 4 years ago

Thanks it worked using the below command mvn clean install spotbugs:check -Dspotbugs.failOnError=True