从质量违规的声纳分析中排除生成的代码 [英] To exclude the generated code from sonar analysis on Quality violation

查看:16
本文介绍了从质量违规的声纳分析中排除生成的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

生成的代码存在于单独的目标文件夹路径中,例如:target/generated-sources/fod1/fod2/*.java

The generated code is present in a separate target folder path like: target/generated-sources/fod1/fod2/*.java

我已经尝试了几个选项,但徒劳无功,请帮助.

I have been trying several option but in vain please help.

<properties>
    <sonar.exclusions>**/generatedsources/fod1/fod2/**/*.java</sonar.exclusions>
</properties>

我也尝试过其中一篇文章中的选项 **/*generated*

I have tried the option from one of the posts also **/*generated*

推荐答案

请参阅常规设置">排除"页面中的文档.如果您使用的不是太旧的 SonarQube 版本,模式 file:**/generated-sources/** 将完成这项工作.

See the documentation in the General Settings > Exclusions page. The pattern file:**/generated-sources/** will do the job if you're not using a too old version of SonarQube.

这篇关于从质量违规的声纳分析中排除生成的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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