- ALM used: GitHub
- Languages of the repository: PHP
- Only if the SonarCloud project is public, the URL: any!
- Error observed: Cannot customise most rules, and cannot remove most rules, if inheriting, and must have to stop inheriting, if I want to remove/change those rules
Steps to reproduce:
As several users pointed out already (Deactivated rules in child quality profiles are not ignored, Deactivate on Extended Profiles, etc)
- Create a quality profile, inheriting from a Sonar Way
- Try to deactivate some rules (for example the outdated and a11y unfriendly “replace all tabs with spaces”), and find that you can NOT disable NOR customise it
Suggested solution by SC:
- stop inheriting and create your own standalone Quality Profile
==> The entire point of inheriting and then customizing a ruleset is that we want to have the updates and quite good (unless some) ruleset of Sonar way, while being able to customize certain rules, or disabling certain rules, that just do not fit the specific project or company definitions
Better solution
Allow users to customize an inherited rule!
Why
If we create a copy of the original, then our copy is “dead”: does not get updates anymore, for any rule.
This makes it a huge work to keep it updated. It destroys the concept of “create a custom ruleset by inheriting from a parent”
There is not much customisation in that, if we are not allowed to… customise it!
The particular rule mentioned (to use tabs over spaces) is just one example, but a good one, because apart of not being customisable, it is also not a11y friendly at all: space space space space
versus tab
when using accessibility tools, is just cumbersome. And while back when this PSR rule was implemented that might have been no concern, it is nowadays: there are many people coding that are visually impaired for example