From 5675385d6b036ba60d17cef39d3229a1e64e1206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Joly?= Date: Wed, 11 Dec 2024 11:30:05 +0100 Subject: [PATCH] Modify rule S3541: Deprecate the rule (CPP-5904) (#4559) Also improve documentation of the deprecation process. --- docs/deprecation.adoc | 2 +- rules/S3541/cfamily/metadata.json | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/deprecation.adoc b/docs/deprecation.adoc index 612a9176db8..b0993dfc9dd 100644 --- a/docs/deprecation.adoc +++ b/docs/deprecation.adoc @@ -2,7 +2,7 @@ == In the RSPEC -The rule status (`/status` in the metadata) should be set to `deprecated`. +The rule status (`/status` in the metadata) should be set to `deprecated`, and its tags should be removed. If the rule is in `SonarWay`, it should be removed from this profile. Optionally, `/extra/replacementRules` can list the rules that replace this rule. diff --git a/rules/S3541/cfamily/metadata.json b/rules/S3541/cfamily/metadata.json index b57157d339b..53aa03b636b 100644 --- a/rules/S3541/cfamily/metadata.json +++ b/rules/S3541/cfamily/metadata.json @@ -7,15 +7,12 @@ }, "attribute": "CLEAR" }, - "status": "ready", + "status": "deprecated", "remediation": { "func": "Constant\/Issue", "constantCost": "2min" }, - "tags": [ - "redundant", - "clumsy" - ], + "tags": [], "extra": { "replacementRules": [ @@ -28,8 +25,6 @@ "ruleSpecification": "RSPEC-3541", "sqKey": "S3541", "scope": "Main", - "defaultQualityProfiles": [ - "Sonar way" - ], + "defaultQualityProfiles": [], "quickfix": "unknown" }