From 67416c1eeca9f3c2f07becd306f62cc76f59198f Mon Sep 17 00:00:00 2001 From: Anton Haubner Date: Wed, 26 Feb 2025 09:30:10 +0100 Subject: [PATCH] Modify rule S6945: Add MAINTAINABILITY quality, increase severity and impact levels (#4707) * Modify rule S6945: Add MAINTAINABILITY quality. S6945 does not necessarily indicate a bug since COND might not be set on purpose. Hence, keeping the type as `CODE_SMELL` appears correct. However, as a code smell, we need to qualify its `MAINTAINABILITY` impact. At the same time, we keep the existing `RELIABILITY` impact: Not setting COND is a practice that not only leads to harder to debug code but it may also lead to bugs * Modify rule S6945: Upgrade severity and impact to Critical and HIGH Following the documentation, MAINTAINABILITY issues should have at least HIGH impact, and Critical severity, if they can lead to the introduction of bugs. RELIABILITY issues should have at least HIGH impact, and Critical severity, if they can for example cause corrupted data. Both applies here. Hence, we upgrade the `defaultSeverity` and impact levels. These are the documentation link: https://docs.sonarsource.com/sonarqube-server/2025.1/extension-guide/adding-coding-rules/#setting-severities-in-mqr-mode https://docs.sonarsource.com/sonarqube-server/2025.1/extension-guide/adding-coding-rules/#setting-severities-in-se-mode --- rules/S6945/jcl/metadata.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules/S6945/jcl/metadata.json b/rules/S6945/jcl/metadata.json index 5ffb2c884f..f02ce219e9 100644 --- a/rules/S6945/jcl/metadata.json +++ b/rules/S6945/jcl/metadata.json @@ -8,7 +8,7 @@ }, "tags": [ ], - "defaultSeverity": "Major", + "defaultSeverity": "Critical", "ruleSpecification": "RSPEC-6945", "sqKey": "S6945", "scope": "All", @@ -16,7 +16,8 @@ "quickfix": "unknown", "code": { "impacts": { - "RELIABILITY": "MEDIUM" + "RELIABILITY": "HIGH", + "MAINTAINABILITY": "HIGH" }, "attribute": "LOGICAL" }