Unable to exclude files from sonarqube analysis

Sonarqube - 7.7

i have added this - **/Content/*.css in coverage exclusion. but still sonarqube doing analysis for this files
Please suggest me the correct way to exclude files.

Do you want to exclude those files from analysis entirely (would be interested to hear why!), or just from coverage calculations (which… I’m going to guess is done by default, as CSS wouldn’t have executable lines)

sonar.exclusions excludes files from everything (SonarQube doesn’t know about them, is a simplified way of looking from it), sonar.coverage.exclusions just excludes files from coverage caclulations.

yes i want to exclude files from entire sonarqube analysis because this are refereed jquery files in which we dont want to change anything. can you please guide me through entire exclusion of Jqeury and css files from analysis

You can pass additional properties to the Scanner for MSBuild using /d: as described in the docs.

To exclude all .css files from analysis, you would add the following argument in the begin step:


1 Like