Why can I not disable this Drupal-only rule in my custom rules for my custom profile? Use of namespaces should be preferred to "include" or "require" functions
This is clearly not useful, and it destroys my quality rating.
I work with WP, not with Drupal, and I have my own rules.
I expect this to be removable… but it is not, it says it is “inherited” (of course, because it comes from the “Sonar way” profile which is a parent to my own custom profile)
And, I’ll flag this for attention for someone to review whether it should be in the default profile or not. It would be great if you could give an example where it is clearly not useful, outside of Drupal code (where an issue is raised for you)
That rule is the only one Drupal rule (or at least the only one named with Drupal) present the the “Sonar way”, and I feel a little uncomfortable that the “Sonar Way” for PHP should suddenly start using Drupal rules.
WordPress is used in approximately 40 times the amount of website worldwide versus Drupal, and uses PHP too… so this really does not add up to me why a default PHP scan would include an almost unused CMS’s rules
This rule might be useful for modern, new code. But about 90% of all plugins and themes, WP itself, does not use namespaces, at all.
It is also quite overkill for most applications (small functional plugins), and newcomers are totally overwhelmed
Thus I do not think this rule is particularly useful, specially since require language constructs are perfectly fine to use. They do what they are designed for.
Stopping to inherit is not an option, we would lose all the “goodies” from the “parent”, I believe.
I will try the second option until the rule hopefully gets removed from the sonar way.