Jeff Cook
Jeff Cook

Reputation: 8774

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

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>

Upvotes: 1

Views: 12592

Answers (1)

Rajnikant Jaybhaye
Rajnikant Jaybhaye

Reputation: 41

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.

Upvotes: 0

Related Questions