Rules are marked as deprecated when we no longer believe in the value provided by the rule or when some rules are re-organized (case of merge or split of rules). Generally the rule is replaced by a new one and the replacement rule is documented in the deprecated rule’s description.
The built-in “Sonar way” Quality Profile is automatically updated for you: deprecated rules are removed and new rules are activated on it.
For your custom Quality Profiles, you should do the same manually:
Sorry, it’s still a bit unclear to me in two areas:
“Sonar way” Quality Profile is automatically updated for you
How do I know which rules should I enable in place of deprecated ones?
[1] In the screenshot attached above, I see “Sonar way” quality profile with deprecated rules. What is the timeframe for these rules to be replaced? I feel anxious about seeing a big red box sitting in Quality Profiles.
[2] Let’s discuss a specific rule an example, i.e. javascript:S4787. How do I know which rules should I enable to compensate the deprecated one?
I’m circulating back as I did not hear from you.
I’m aware my previous response was 6 days delayed, but I got distracted with something.
Could we continue this thread?
The rule javascript:S4787 is as of now not deprecated but if it was the case then you would see at the end of the rule’s description a “Deprecated” section. This section explains which rule should be used as a replacement if any exists.
For the case of S4787 for Java, it’s written this:
## Deprecated
This rule is deprecated, and will eventually be removed.
It means you are informed that we no longer believe in this rule and but there is no replacement yet.
For some other rules there is an explanation of which rule to activate as a replacement: