Can anyone tell me how exactly to change severity of the rule in sonar? There is a special section in sonar for activities like this - Quality Profiles. But the opportunity of changing severity is disabled.
How to make it enabled? Maybе I need some special rights for those activities? If so, what are these rights?
Thanks in advance.
There are three ways to add coding rules to SonarQube: Writing a SonarQube plugin in Java that uses SonarQube APIs to add new rules. Adding XPath rules directly through the SonarQube web interface. Importing Generic Issue Reports generated by an independently run tool.
If you're in connected mode then SonarLint is getting its data about existing issues from SonarQube. And until the next analysis, the severity of that existing issue is still what it was before you changed the rule severity. You see, there's no continuous relationship between a rule and its issues.
Severity change - This is the middle ground between the first two options. Yes, it's a problem, but it's not as bad a problem as the rule's default severity makes it out to be. Or perhaps it's actually far worse. Either way, you adjust the severity of the issue to bring it in line with what you feel it deserves.
In SonarQube context, we are using the types and severity provided by SonarQube, it is not possible to set any severity you may want. So despite the fact that scapegoat refers to it as an “error”, I think it makes sense to set it as a minor bug. Hope it clarifies the situation.
In versions prior to 3.6, management of quality profiles is restricted to system administrators.
Since SonarQube 3.6, there is a dedicated "Administer Quality Profiles" permission.
See Quality Profiles in the SonarQube documentation.
These steps apply to sonar 6.7
my way
by copying the default.You may also want to set that profile as a default
Open the new profile my way
Deactivate the rule you want to change
Get id in description:
Search for id in rules:
Finally you can set a new severity level (You'll find the activation button at the button of the description)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With