diff options
author | Dejan Milisavljevic <130993898+dejan-milisavljevic-sonarsource@users.noreply.github.com> | 2024-09-18 14:03:50 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-09-18 20:02:59 +0000 |
commit | e55e29f6e2632c1eef4db2d659e685a50caa10a6 (patch) | |
tree | c178331b8d79e523a9c3bdbbc82f611781413dbc /plugins/sonar-xoo-plugin | |
parent | 7fe4eae27f3b725ea08c79d5a0373596200a1627 (diff) | |
download | sonarqube-e55e29f6e2632c1eef4db2d659e685a50caa10a6.tar.gz sonarqube-e55e29f6e2632c1eef4db2d659e685a50caa10a6.zip |
SONAR-22951 Use 5 levels severities for Software Impact
Co-authored-by: Léo Geoffroy <leo.geoffroy@sonarsource.com>
Co-authored-by: Stanislav <31501873+stanislavhh@users.noreply.github.com>
Co-authored-by: Viktor Vorona <viktor.vorona@sonarsource.com>
Co-authored-by: OrlovAlexander <35396155+OrlovAlexander85@users.noreply.github.com>
Co-authored-by: stanislavh <stanislav.honcharov@sonarsource.com>
Diffstat (limited to 'plugins/sonar-xoo-plugin')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java | 6 | ||||
-rw-r--r-- | plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java index 9110916977d..9ca57ae518d 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneIssuePerLineSensor.java @@ -96,14 +96,16 @@ public class OneIssuePerLineSensor implements Sensor { return null; } switch (severity) { - case CRITICAL: case BLOCKER: + return org.sonar.api.issue.impact.Severity.BLOCKER; + case CRITICAL: return org.sonar.api.issue.impact.Severity.HIGH; case MAJOR: return org.sonar.api.issue.impact.Severity.MEDIUM; case MINOR: - case INFO: return org.sonar.api.issue.impact.Severity.LOW; + case INFO: + return org.sonar.api.issue.impact.Severity.INFO; default: return null; } diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java index 6468f7ef0d9..4dbd8085f62 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java @@ -127,7 +127,7 @@ public class XooRulesDefinition implements RulesDefinition { NewRule oneIssuePerLine = repo.createRule(OneIssuePerLineSensor.RULE_KEY).setName("One Issue Per Line") .setCleanCodeAttribute(CleanCodeAttribute.COMPLETE) - .addDefaultImpact(SoftwareQuality.MAINTAINABILITY, Severity.MEDIUM) + .addDefaultImpact(SoftwareQuality.MAINTAINABILITY, Severity.INFO) .setTags("line"); addDescriptionSectionsWithoutContexts(oneIssuePerLine, "Generate an issue on each line of a file. It requires the metric \"lines\"."); addHowToFixSectionsWithContexts(oneIssuePerLine); @@ -138,7 +138,7 @@ public class XooRulesDefinition implements RulesDefinition { NewRule oneQuickFixPerLine = repo.createRule(OneQuickFixPerLineSensor.RULE_KEY).setName("One Quick Fix Per Line") .setCleanCodeAttribute(CleanCodeAttribute.DISTINCT) - .addDefaultImpact(SoftwareQuality.MAINTAINABILITY, Severity.MEDIUM) + .addDefaultImpact(SoftwareQuality.MAINTAINABILITY, Severity.BLOCKER) .setTags("line"); addAllDescriptionSections(oneQuickFixPerLine, "Generate an issue with quick fix available on each line of a file. It requires the metric \"lines\"."); |