Compare commits

...

3 Commits

Author SHA1 Message Date
Anton Haubner
a33a6bbd7c 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
2025-02-25 13:14:35 +01:00
Anton Haubner
8bc9204b58 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
2025-02-25 13:14:35 +01:00
Anton Haubner
b950e447ae Modify rule S6977: Change type to BUG
S6977 definitely impacts RELIABILITY, but it was typed as a
`CODE_SMELL`.
However, if reliability is the main quality of an issue, then it should
be paired with the `BUG` type.

S6977 is not a BUG in the sense that correctness is affected.
At the same time, the previous MAINTAINABILITY quality is not impacted at all.
Also, the issue does negatively affect performance, so it is bug in that sense.

Thus, the decision was made to change the type to `BUG`.
See also
https://sonarsource.slack.com/archives/C026N4DMXNK/p1740474666962219?thread_ts=1740420785.011249&cid=C026N4DMXNK
for an internal discussion.
2025-02-25 13:14:35 +01:00
2 changed files with 4 additions and 3 deletions

View File

@ -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"
}

View File

@ -1,6 +1,6 @@
{
"title": "RLSE should be used in SPACE directive",
"type": "CODE_SMELL",
"type": "BUG",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",