user2870099
user2870099

Reputation: 121

How to change severity of the rule in sonar?

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.

Upvotes: 12

Views: 11643

Answers (3)

Herbert
Herbert

Reputation: 31

For SonarQube 7.9

  1. Select the Rules Tab
  2. Select a rule
  3. Click the change button (You can only change custom profiles)

Upvotes: 3

Matthias M
Matthias M

Reputation: 14800

These steps apply to sonar 6.7

  1. Create a new profile my way by copying the default.

enter image description here

  1. Activate that profile for your sonar project

enter image description here

You may also want to set that profile as a default

enter image description here

  1. Open the new profile my way

  2. Deactivate the rule you want to change

enter image description here

  1. Activate the rule again.

Get id in description:

enter image description here

Search for id in rules:

enter image description here

Finally you can set a new severity level (You'll find the activation button at the button of the description)

enter image description here

Upvotes: 11

Mithfindel
Mithfindel

Reputation: 4708

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.

Upvotes: 7

Related Questions