简体   繁体   English

在质量门变更的情况下更新项目状态

[英]Updating project status under a change in quality gate

I recently used sonarqube api to create a dynamic quality gate, it increases or decreases the acceptable number for the project, according to the number of lines of code, but I'm having some problems ... 我最近使用sonarqube api创建了一个动态质量门,它根据代码行数增加或减少了项目可接受的数量,但是我遇到了一些问题...

It works like this, after the analysis I use the number of lines and calculate the quality gate to increase or lower the acceptable limit 它是这样工作的,在分析之后,我使用行数并计算质量门以增加或降低可接受的极限

I use the sonar line count itself to avoid mismatching information, but whenever I update a quality gate, the project status is not updated. 我使用声纳线数本身来避免信息不匹配,但是每当更新质量门时,项目状态都不会更新。

For example, if a project was with the quality gate with the status "Passed", after I update the quality gate, it should change the status to "Failed", but it remains "Passed" because I did not perform a new analysis. 例如,如果一个项目的质量门状态为“通过”,则在更新质量门后,该项目应将状态更改为“失败”,但它仍为“通过”,因为我没有执行新的分析。

How can I request pro sonar to re-execute the project status according to the quality gate change? 如何根据质量门的更改要求声呐重新执行项目状态?

I'm using sonarqube 6.0 我正在使用sonarqube 6.0

Thanks 谢谢

You have no choice but to re-run an analysis if you want your quality gate to be updated. 如果您希望更新质量门,则别无选择,只能重新运行分析。

Just as a side note: it looks like you are trying to hack SonarQube features, I would not recommend to go into that way because you will for sure face problems. 顺便提一句:您似乎正在尝试破解SonarQube功能,因此不建议您采用这种方式,因为您肯定会遇到问题。 Instead, I highly encourage you to read "Water Leak Changes the Game for Technical Debt Management" and consider using the built-in quality gate that puts the focus on new code: this is the best and easiest way to improve code quality over-time with almost no effort and no friction. 相反,我强烈建议您阅读“漏水改变了技术债务管理的游戏”,并考虑使用内置的质量关卡,重点关注新代码:这是随着时间的推移提高代码质量的最佳和最简便的方法几乎没有任何努力,也没有摩擦。

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

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