简体   繁体   English

Runninng针对声纳数据库中的现有项目更新了质量配置文件

[英]Runninng updated quality profile against exisinting projects in sonar qube

I currently have a SonarQube instance setup with multiple projects. 我目前有一个具有多个项目的SonarQube实例设置。 Currently I get multiple requests every few weeks to update the quality profile to include a new rule or to remove an old one. 目前,我每隔几周收到多个请求,以更新质量配置文件以包括新规则或删除旧规则。 This is usually followed by me having to recreate the projects and then sequentially running analysis again so that I can have the differential view again starting from a baseline code. 通常,这之后我不得不重新创建项目,然后再次顺序运行分析,以便可以从基线代码开始再次获得差异视图。 This is becoming a pain as the number of projects grow. 随着项目数量的增加,这变得越来越痛苦。 Is there any alternative to this? 除此之外,还有其他选择吗? For instance is there any way to tell Sonar to pick up the new rules from the quality profile and run the existing analysis again against these rules. 例如,可以通过任何方法告诉Sonar从质量配置文件中选择新规则,然后针对这些规则再次运行现有分析。

If I don't do that I get a spike in issues as new rules get added and a new analysis is run as the existing analysis wasn't run against those rules and doesn't have an accurate issue number. 如果我不这样做,我会在添加新规则时遇到问题高峰,因为现有分析不是针对这些规则运行的,并且没有准确的问题编号,因此会运行新的分析。

Thanks for the help! 谢谢您的帮助!

Once you have linked a profile to a project, you can change the rule set and it will be used during the next analysis. 将概要文件链接到项目后,您可以更改规则集,该规则集将在下一次分析中使用。 As you add or remove rules, spikes are normal. 添加或删除规则时,峰值是正常的。 Propably what you want to ensure is that for example no new rules are introduced as you want to ensure the quality is not going down, but is always improved. 可能要确保的是例如没有引入新规则,以确保质量不会下降,但始终会得到改善。 You can do it using quality gates and build breaker plugin. 您可以使用质量门来构建断路器插件。 Hopefully I could help. 希望我能帮上忙。

I am not sure to understand very well what you want to do, if this is running again a new (changed) profile to all previous versions of a project, or to apply different profiles on different versions of a project. 如果这再次在项目的所有先前版本上运行新的(更改的)配置文件,或者在项目的不同版本上应用不同的配置文件,则我不确定您要做什么。

Maybe this could help you ? 也许这可以帮助您? SonarQube - analyzing branches of the same project How to configure Maven to run a SonarQube project analysis with two different quality profiles? SonarQube-分析同一项目的分支 如何配置Maven以运行具有两个不同质量配置文件的SonarQube项目分析?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM