Reputation: 49
Trying to exclude any minor code smells from appearing in the sonar scan report. I need a catch all for all the minor code smells, but can't find any. Below is what i currently have in my properties file, but does not work. I've also tried using Minor
, *minor*
, but it still doesn't exclude it. I can exclude specific rules, but excluding every minor code smell rule would result in too many lines. Any ideas?
sonar.java.source=8
sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
sonar.issue.ignore.multicriteria=e1
sonar.issue.ignore.multicriteria.e1.ruleKey=java:*Minor*
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*.java
# Sample path given, Update path accordingly
Upvotes: 1
Views: 1205
Reputation: 118
You can't ignore issues by severity (info, minor, major, blocker, critical) directly. Instead, you'll need to find all the minor issues' rule keys and ensure your regex pattern detects them.
However, what you are doing is counterintuitive. You should utilize a custom quality profile to deactivate minor severity rules and ensure you apply that custom quality profile to your project.
Upvotes: 0