Does anyone know a jenkins plugin for Java that analyses the coding styles and fails the build (not only provide a report) in case there are styles violations?
Asked
Active
Viewed 593 times
1
-
You should use maven checkstyle plugins in your pom as part of your build. – Sid Malani Dec 08 '18 at 20:21
2 Answers
1
You can use Findbugs
and Checkstyle
for the same.
https://plugins.jenkins.io/checkstyle
https://plugins.jenkins.io/findbugs
Jacoco is used to unit test coverage and not really for static analysis.

Durgadas Kamath
- 400
- 2
- 12
0
the solution is to use a plugin of your build tool(like jacoco plugin in your pom for maven build).
And then configure your jenkins pipline to fail if quality is not satisfying

Lho Ben
- 2,053
- 18
- 35
-
-
refer to the answers of this question for more details https://stackoverflow.com/questions/40504535/how-to-react-on-sonarqube-quality-gate-within-jenkins-pipeline – Lho Ben Dec 08 '18 at 21:16