声纳违规的 Gradle 构建失败 [英] Fail Gradle Build for Sonar Violations

查看:28
本文介绍了声纳违规的 Gradle 构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当出现 Sonar 违规时,如何配置我的 Gradle 构建失败?

How do I configure my Gradle build to fail when there are Sonar violations?

如果 Sonar 中存在任何严重或阻止程序违规,我希望我的 Gradle 构建失败,是否支持此功能?如果有,是否记录在任何地方?

I want my Gradle build to fail if there are any are any critical or blocker violations in Sonar, is this functionality supported? If so, is it documented anywhere?

推荐答案

这不是可以在构建端配置的东西.相反,必须在 Sonar 端配置构建断路器插件".我不完全确定它是否适用于 Gradle,但我认为可以.

It's not something that can be configured on the build side. Instead, the "build breaker plugin" has to be configured on the Sonar side. I'm not completely sure if it works with Gradle, but I think it does.

这篇关于声纳违规的 Gradle 构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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