2

I have a rule in my SonarQube that has no Quality Profile associated with it in the search list (The red box here). When I try to change it I get this error, and when i try to click the Deactivate button, nothing happens.

I tried adding a Quality Profile with that name and then changing it, but I think that name might refer to the ID instead of the readable name so that didn't work.

How would I go about removing a rule that has a missing Quality Profile?

mike
  • 565
  • 1
  • 3
  • 18

2 Answers2

2

The best way to fix these kinds of issues is to stop your instance, clear $SQ_HOME/data/es and restart your instance. This will ensure that the ElasticSearch index of rules is in sync with the database state.

Mithfindel
  • 4,553
  • 1
  • 23
  • 32
0

I think I may have figured it out.

I just had to manually insert a new row into the rules_profiles database table with a key that matched the one in the error. Then go back into the online interface and delete that profile.

jeff porter
  • 6,560
  • 13
  • 65
  • 123
mike
  • 565
  • 1
  • 3
  • 18