Java 从 Sonarqube 导出编码规则列表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26905477/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 03:30:14  来源:igfitidea点击:

Export list of coding rules from Sonarqube

javalistsonarquberules

提问by makeMonday

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?

我试图找到一种方法来获取所有 Sonarqube Java(或其他)规则(带有键、描述等)的列表,并将其导出为 Excel、csv 或 xml。我可以像这样“动态地”列出它们,但我希望将它们全部放在一个文件中。有谁知道如何做到这一点?

采纳答案by David RACODON - QA Consultant

You can use the /api/rules web service: http://docs.sonarqube.org/pages/viewpage.action?pageId=2392166

您可以使用 /api/rules 网络服务:http: //docs.sonarqube.org/pages/viewpage.action?pageId=2392166

回答by tumisma

Check this out http://nemo.sonarqube.org/profiles

看看这个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...

初始配置文件视图仅列出所有规则。您可以单击备份链接并将规则导出到 xml 文件。这个xml文件有规则、repositoryKey、key...

I'm not really sure if this is what you want, but hope you find it useful!

我不确定这是否是您想要的,但希望您觉得它有用!