From fa63b63858b623206c6bedb7d6be53d8b1a4c090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Joly?= Date: Thu, 5 Dec 2024 22:51:40 +0100 Subject: [PATCH 1/3] S3541: Deprecate the rule --- docs/deprecation.adoc | 2 +- rules/S3541/cfamily/metadata.json | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/deprecation.adoc b/docs/deprecation.adoc index 612a9176db8..af1418322aa 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`. 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..4870c639db2 100644 --- a/rules/S3541/cfamily/metadata.json +++ b/rules/S3541/cfamily/metadata.json @@ -7,7 +7,7 @@ }, "attribute": "CLEAR" }, - "status": "ready", + "status": "deprecated", "remediation": { "func": "Constant\/Issue", "constantCost": "2min" @@ -28,8 +28,6 @@ "ruleSpecification": "RSPEC-3541", "sqKey": "S3541", "scope": "Main", - "defaultQualityProfiles": [ - "Sonar way" - ], + "defaultQualityProfiles": [], "quickfix": "unknown" } From 111c5fcc4056ad203fe65569acd7f87f1525dd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Joly?= Date: Tue, 10 Dec 2024 18:14:38 +0100 Subject: [PATCH 2/3] Add tag removal --- docs/deprecation.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deprecation.adoc b/docs/deprecation.adoc index af1418322aa..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`. If the rule is in `SonarWay`, it should be removed from this profile. +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. From 794f08470e519c6cc3acb4eb5f6c68ffdb25501d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Joly?= Date: Tue, 10 Dec 2024 18:15:06 +0100 Subject: [PATCH 3/3] Remove tags --- rules/S3541/cfamily/metadata.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rules/S3541/cfamily/metadata.json b/rules/S3541/cfamily/metadata.json index 4870c639db2..53aa03b636b 100644 --- a/rules/S3541/cfamily/metadata.json +++ b/rules/S3541/cfamily/metadata.json @@ -12,10 +12,7 @@ "func": "Constant\/Issue", "constantCost": "2min" }, - "tags": [ - "redundant", - "clumsy" - ], + "tags": [], "extra": { "replacementRules": [