rspec/docs/deprecation.adoc

22 lines
1015 B
Plaintext
Raw Permalink Normal View History

= Deprecation
== In the RSPEC
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.
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.