To obtain more accurate metrics on a project it may be very useful to exclude some part of the project only for coverage test (for example).
As some part of our project are not testable (Struts 1.X Action, ...) we prefer to have a metric saying "X % of the testable part is covered" instead of "X % of the whole application is covered". But we want the violation metrics computed for the whole application.
This can be done by configuring the Cobertura plugin in the project pom, but it may be more efficient if Sonar include it !
For example :
- sonar.exclusion : general property to exclude some classes from analysis
- sonar.coverage.exclusion : dedicated property to exclude some classes from code coverage computing
- sonar.skippedModules : general property to exclude some modules from analysis
- sonar.coverage.skippedModules : dedicated property to exclude some modules from code coverage computing