Environment of the issue:
SonarQube on-prem Version 9.4 (build 54424)
The DuplicatedBlocks rule is marked as deprecated, but still part of the official rulesets across languages. For Example common-java:DuplicatedBlocks is enabled in Java Sonar Way.
Why is the rule still enabled if its deprecated? Is this a known bug in the ruleset?
Wait. Stop. Showing problematic places like Code-Duplicates is a core task of Quality-Management. The purpose of SonarQube. Why does this rule get removed completely, or at least gets removed from the default rules?!
I’m baffled.
I assume this is a misunderstanding?
Could you please explain this?
Thanks for your concern. Detecting code duplication is not going away from SonarQube, but the rule that raises a file-level issue when a duplicated block is found in a file is going away.
This rule is too strict, as it effectively enforces 0% duplication for all files
Rules like this really don’t map to our Clean as you Code philosophy, because it only ever looks at overall code (no differentiation between old code and new code)
There are Quality Gate conditions to flag a project/pull request when duplication has exceeded a certain threshold. These can be applied on new code and/or overall code. We think this is far more useful and relevant.
All other features in SonarQube related to duplication are staying put. This single rule is now deprecated and will be removed in SonarQube 10.0