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