Disable Sonarqube quality profile rules - cannot in version 8.8

  • versions used: SonarQube 8.8
  • error observed: cannot disable one or a few quality profile rules for C-code
  • steps to reproduce: disable icon grey
  • potential workaround: none

First with SQ8.8 I copy the “Sonar Way” quality profile to “Myprofile”, and I have given my user this permission > Users with the global “Manage Quality Profile” permission can manage this Quality Profile.
Like with all previous SQ versions I want/need to disable just a few quality rules. We can surely debate whether these rules are “good”. This is not really the focus.
For sake of argument focus on this rule c:S1110 " “Redundant pairs of parentheses should be removed”. Below Code Smells I locate the rule and observe that the rule (and actually all active rules) cannot be disabled. It appears that this newer function with permissions for editing quality profiles have changed from version 8.4 and does not really work in 8.8 - or have I missed something?

image

Another potentially related problem; great that I can save my quality profile as XML but I do not find a place where I can restore/read the XML ind again.

One more comment - I am merely using the H2 database

Hi,

To be clear:

  • You copied the profile rather than inheriting it?
  • The profile you have selected in the relevant facet on the rules page is your profile & not the build-in one?
  • What do the controls look like when you click through to the rule detail?

 
Ann

Hi @ganncamp
Where is the “inheriting” function found? I see Copy, Compare, Extend, Set as default when I want to see what I can do with an existing C Quality Profile
image

Hi,

Inherit == Extend. Sorry for the wording change. I think of it as inheritance & forget the actual wording in the interface.

 
Ann

Hold your horses…
I see it now.
Security → Global Permissions did not pick up that I was allowed to edit the permissions.

@ganncamp after editing Global Permissions I can Activate and Deactivate as normal.
All fine - just a new thing I did not understand carefully.

Done deal :slight_smile:

1 Like