SonarQube Support Rule-remove these useless parentheses

Hi Team,

We have an SQ rule in SQL SQ porject to remove the additional parenthesis as shown below. The extra parenthesis is added by SQL server by default and DBAs don’t have an option to get over it.
We need to either have SQ team remove this rule (or) we need to live this code smell in our project. Please check and suggest on this.
SQ version: SonarQube™ Enterprise Edition Version 7.9.3 (build 33349)

Thanks,
Upendar

Hi Upendar,

I think you forgot the “as shown below” but going off what you wrote, it sounds like you want a custom Quality Profile. I would start by copying the profile you’re currently using - Sonar way, I guess - and then removing the rules you don’t want to use. Once you set your new Quality Profile as the default, you should be good to go.

 
HTH,
Ann

Hi Ann, thanks for the response.
We have created custom quality profile by extracting it from the default profile sonar-way, but we’re unable to delete the unwanted rules. Please advise us.

Thanks,
Upendar

Hi Upendar,

How about a screenshot of your Quality Profile page? Like this:

 
Ann

Hi Ann, Our quality profile page looks like this

Hi,

You’re not going to be able to remove rules from Built-in profiles. You also can’t remove rules from inherited profiles, which is what your screenshot shows your custom profile is.

To have a profile you can remove rules from, you’ll need to create a brand new, non-inherited profile into which you copy the rules from the Sonar way profile (assuming you want that as your starting point). Then you’ll be able to remove the rule you don’t like.

And yes, by doing it this way, you won’t automatically inherit changes when Sonar way adds interesting new rules. You’ll have to keep an eye on this and keep it up to date manually.

 
Ann