Sonarqube ignoring files / folders not working
See original GitHub issueDescribe the bug I’m using jenkins to scan on sonarqube, and I’ve got the code coverage working using your tool, but I can’t for the life of me work out how to exclude a file / folder successfully.
I’m using dotnet-reportgenerator-globaltool as we use .Net Core 3.1
To Reproduce
This is my main command:
reportgenerator "-reports:*/TestResults/*/coverage.cobertura.xml" "-targetdir:sonarqubecoverage" "-reporttypes:SonarQube"
I’ve tried the following with no success:
-assemblyfilters:-*DevonMicroservice\\.Application\\.Configuration*
-assemblyfilters:-*DevonMicroservice.Application.Configuration*
-assemblyfilters:-DevonMicroservice.Application.Configuration*
-filefilters:-*DependencyInjectionConfiguration.cs
-filefilters:-*ConfigReader.cs
I have also tried wrapping them in quotes which hasn’t worked either
I have files such as:
DevonMicroservice.Application.Configuration/ConfigurationManager.cs
I’d like to ignore any files underneath the folder: “DevonMicroservice.Application.Configuration” and others, but if I can get one working it should be rather simple (I hope) to fix
Any help would be greatly appreciated!
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)

Top Related StackOverflow Question
Yes I experience the same locally Must be a sonarqube issue Appreciate your quick and detailed support massively
Thanks, in the end I have gone for the approach of “include” rather than “exclude” I have got the coverage up, but I’m still experiencing sonarqube behaving oddly, but I don’t think this is your tool, as that is working exactly as expected locally. Thank you again 😃