sonar.coverage.exclusions and sonar.exclusions does not exclude the files from

て烟熏妆下的殇ゞ 提交于 2019-12-10 12:03:56

问题


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

Any help is much appreciated

<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>

回答1:


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.



来源:https://stackoverflow.com/questions/57572463/sonar-coverage-exclusions-and-sonar-exclusions-does-not-exclude-the-files-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!