Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.0
-
Component/s: Coverage & Tests, Exclusions/Inclusions
-
Labels:None
-
Environment:Sonar 1.7/ Tomcat 6/ SQLServer 2005
Description
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
Attachments
Issue Links
- is related to
-
SONAR-3108 Provide a way to exclude some source files from the duplication detection mechanism
-
- Closed
-
-
SONAR-3295 Change sonar.jacoco.excludes behaviour so that it excludes from both instrumentation and coverage report
-
- Closed
-
- relates to
-
SONAR-5050 Allow definition of exclusion patterns for code coverage by integration tests
-
- Closed
-
-
SONAR-4658 Rename the sub-category "Exclusions" into "Files"
-
- Closed
-
-
SONARJAVA-42 Should be possible on demand to set code coverage to 0 when no report is available
-
- Closed
-