2021-08-10 18:59:12 +02:00
= Deprecation
== In the RSPEC
2024-12-11 11:30:05 +01:00
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.
2021-08-10 18:59:12 +02:00
Optionally, `/extra/replacementRules` can list the rules that replace this rule.
The `superseded` status from Jira has been superseded by the `deprecated` status during transition to RSPEC V2.
== When running ruleAPI
We detect if replacement rules are specified and if they have been implemented or not.
* If they don't exist, the rule is exported as `deprecated`, and a text is added to the description
* If they are specified, but have not been implemented, the rule is not considered as deprecated (its status is set to `ready` during the export).
* If they are specified and implemented, the status remains `deprecated`, and a text mentioning the replacement rules is added to the description.
In all cases, the `/extra/replacementRules` is removed from the metadata available to the analyzer.