Add documentation about rule deprecation (#257)

This commit is contained in:
Loïc Joly 2021-08-10 18:59:12 +02:00 committed by GitHub
parent a3166ba6fc
commit b5f76d1705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
docs/deprecation.adoc Normal file
View File

@ -0,0 +1,21 @@
= Deprecation
== In the RSPEC
The rule status (`/status` in the metadata) should be set to `deprecated`.
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.