I am trying to find a way to get a list of all Sonarqube Java (or whatever) rules (with keys, description, etc.) and export it as an Excel, csv or xml. I get to list them "dynamically" like this, but I would like to have them all in a file. Does anyone know how to do this?
Asked
Active
Viewed 3.5k times
11
-
Were u able to export it? – Nayeem Aug 22 '15 at 12:15
2 Answers
5
Check this out http://nemo.sonarqube.org/profiles
The initial Profile view just lists all the rules. You can click on the backup link and export the rules to an xml file. This xml file has the rule, the repositoryKey, the key...
I'm not really sure if this is what you want, but hope you find it useful!

tumisma
- 375
- 3
- 14
-
1The XML file did not have the description of the rule, which was something that I was really looking for, but I used its list of keys which was useful in the end. Thanks! – makeMonday Nov 13 '14 at 14:02
4
You can use the /api/rules web service: http://docs.sonarqube.org/pages/viewpage.action?pageId=2392166

Mark Rotteveel
- 100,966
- 191
- 140
- 197

David RACODON - QA Consultant
- 4,003
- 1
- 13
- 14
-
I did not use this in the end, because it was easier to search for the description manually (I did not have a huge list), but I'll keep this in mind, it looks really useful! Thanks ;) – makeMonday Nov 13 '14 at 14:03
-
Web API is now available via `{yourSonarServer}/web_api`. https://docs.sonarqube.org/display/DEV/Web+API – Thoomas Aug 22 '17 at 09:50