Hi I’m looking for rules Track uses of disallowed classes (RSPEC-3688) but it is not found in sonarcloud rules any idea why?
Hey there.
You aren’t able to find this rule because it’s classified as a “Template Rule”, which aren’t available on SonarCloud.
Imagine SonarCloud as a big box of toys. Regular rules are like ready-made toys you can play with straight away - they come pre-set with specific functionalities that can’t be changed.
On the other hand, “Template Rules” are like toy-building kits. They are flexible and allow you to add your own touch. However, these kits need time and effort to put together. Due to certain restrictions, SonarCloud does not support these “toy-building kits”, meaning custom rules, like “Track uses of disallowed classes”, are not allowed on SonarCloud.
The fact that this is a template rule at all is… a choice. You could imagine a parameterized rule where you provide a list of all the disallowed classes and have a single rule for all disallowed classes. It’s less flexible/customizable, but would ultimately raise issues.
There’s nothing in the works now, but I’m curious if this would work for you (it would be good feedback for us).