sonar.coverage.exclusions和sonar.exclusions不会从以下位置排除文件 [英] sonar.coverage.exclusions and sonar.exclusions does not exclude the files from

查看:1637
本文介绍了sonar.coverage.exclusions和sonar.exclusions不会从以下位置排除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经经历过:将Sonar配置为从以下位置排除文件Maven pom.xml ,但SonarLint仍然无法执行所有文件.

I already went through : Configure Sonar to exclude files from Maven pom.xml and still SonarLint is unable to execlude those all files.

非常感谢您的帮助

<properties>
    <java.version>1.8</java.version>
    <sonar.coverage.exclusions>
        **/dto/**/*, **/entity/**/*,
        **/exception/**/*, **/repository/**/*,
        **/enums/**/*, 
        **/assembler/**/*, 
        **/src/main/resources/sql/**/*,
        **/controller/**/*,
        **/utils/**/*, 
        **/security/**/*,
        **/servlet/**/*,
        **/MainApplication.java
    </sonar.coverage.exclusions>
    <sonar.exclusions>
        **/entity/**/*, 
        **/constant/**/*,
        **/repository/**/*, 
        **/src/main/resources/sql/**/*, 
        **/enums/**/*
    </sonar.exclusions>
</properties>

推荐答案

请按照以下过程排除文件:在SonarQube中单击您的项目名称->管理->常规设置->分析范围->覆盖范围排除或源文件排除项(您可以在文本框中输入文件格式)

Follow this procedure to exclude the files: Click on your project name in SonarQube -> Administration -> General Settings -> Analysis Scope -> Coverage Exclusions OR Source File Exclusions (You can put the file pattern in the text box)

这将跳过与给定模式匹配的文件.

This will skip the files which matches the given pattern.

这篇关于sonar.coverage.exclusions和sonar.exclusions不会从以下位置排除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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