1

Is there a way I can exclude priority 3 violations from the Jenkins graph? The other codenarc report types like 'html' or 'sortable' have a maxPriority option which does exactly what I want, but that option doesn't exist for the type=xml report.

Help?


Details:

I use codenarc as a lint-like source code analysis tool for my Groovy / Grails project.

The Jenkins Violations Plugin supports codenarc (among others) and allows the Jenkins job to not only display an HTML codenarc report, but also Fail the build if, say, you have 1 or more high priority violations.

This is all great but I don't want any priority 3 (low level) violations to appear in the nifty graph which the violations plugin creates in Jenkins.

It's more an issue of visual appeal than anything else. I don't want low level violations to appear at all.

Am I left with only the option of removing all priority 3 references by post-processing the xml file that is initially generated? Regex to the rescue. In that case I guess I add a Build Step that is a Groovy Script which runs before the Violations are evaluated?

Vahid Pazirandeh
  • 1,552
  • 3
  • 13
  • 29

0 Answers0