静态分析警告是否会导致CI构建失败? [英] Should static analysis warnings fail the CI build?

查看:237
本文介绍了静态分析警告是否会导致CI构建失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的团队正在研究我们项目中的静态分析的各种选项,并且对于我们是否希望我们的持续集成构建由于静态分析的警告而失败有着不同意见。

Our team is investigating various options for static analysis in our project, and have mixed opinions about whether we want our Continuous Integration build to fail because of warnings from static analysis.

反对失败的论据是,规则往往有例外,试图解决它们只是为了使构建成功降低了生产力。更好的方法是使用构建生成报告,并定期致力于开发人员时间来解决报告的问题。

The argument against failing the build is that there are often exceptions to the rules, and attempting to work around them just to make the build succeed reduces productivity. A better approach would be to generate reports with the build, and regularly dedicate developer time to addressing the reported issues.

反对的观点是,技术如果不立即处理这些错误,债务就会累积起来。

The counter-argument is that it is easy for the technical debt to build up if the bugs are not addressed immediately. Also, if the build fails when a potential bug is introduced, the amount of time required to fix it is reduced.

你的想法是什么?

推荐答案

这可能是一个好主意,失败的建设,但这不必是一个绝对黑白的决定。

It's probably a good idea to fail the build, but this doesn't have to be an absolutely black and white decision.

Hudson 允许您在构建中失败,如果某个阈值超过了新的静态分析故障。所以你可以说如果引入1个新故障,将构建标记为不稳定;如果引入5个新故障,将构建标记为失败。

Hudson lets you fail a build if a certain threshold of new static analysis faults is exceeded. So you can say "mark the build as unstable if 1 new fault is introduced; mark the build as failed if 5 new faults are introduced".

这是Hudson可用的各种分析插件内置的东西。

This is something that's built into the various analysis plugins available for Hudson.

这篇关于静态分析警告是否会导致CI构建失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆