如何将质量配置文件规则导出到Excel中 [英] How to export Quality Profile rules into Excel
问题描述
我们正在使用SonarQube 4.5.1作为我们的项目,并计划为最终用户提供激活/停用规则列表。
We are using SonarQube 4.5.1 for our projects and are planning to provide list of rules activation/deactivation to end users.
什么是最佳导出方式?在Excel中导入SonarQube?
What is best way to export/import within SonarQube in Excel?
在质量配置文件中有备份选项,但没有导出描述。
我直接在数据库中查看规则表,但是由于某些HTML标签,这不适用于用分号分隔。
There is option of backup in Quality Profile but it did not export description. I looked directly in the database with rules table, but due to some HTML tag this is not working for delimited with semicolon.
我也想知道我们如何可以将自定义规则添加到现有规则集中。什么是程序?
I would also like to know how we can add customized rules to existing set of rules. What is the procedure?
推荐答案
SonarQube界面真的将是您的用户最好的参考。根据您的评论中的信息,我建议一个简单的Web表单,而不是尝试构建一个电子表格。
The SonarQube interface is really going to be the best referential for your users. Based on the info in your comment, I'd suggest a simple web form rather than trying to construct a spreadsheet.
它可能有助于知道您可以使用repository配置文件和XML配置文件备份中返回的密钥来构建任何规则的URL:
It may help to know that you can construct the URL to any rule using the repositoryKey and key returned in the XML profile backup:
http:// [server] / coding_rules#rule_key = [repositoryKey]:[key]
EG https://sonarcloud.io/api/rules/search?rule_key=csharpsquid% 3AS907
该API支持在此记录的许多参数: https://sonarcloud.io/web_api/api/rules/search (点击水平线上方的参数标题打开说明)。
The API supports many parameters that are documented here: https://sonarcloud.io/web_api/api/rules/search (click the Parameters header above the horizontal line to open the descriptions).
例如,languages参数可以搜索适用于一种或多种语言(逗号分隔的列表)的规则。要获取所有C#规则的列表,您可以使用 https://sonarcloud.io/ api / rules / search?languages = cs
For example, the languages parameter makes it possible to search for rules that apply to one or more languages (a comma-separated list). To get the list of all C# rules, you can use https://sonarcloud.io/api/rules/search?languages=cs
这篇关于如何将质量配置文件规则导出到Excel中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!