SonarQube: Cannot deactivate rule with missing quality profile

帅比萌擦擦* 提交于 2019-12-24 03:54:14

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/28199435/sonarqube-cannot-deactivate-rule-with-missing-quality-profile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!