I am using sonarcloud analysis in my java project with gradle. I want to exclude some files/folders from codecoverage (dtos, etc.). In gradle I defined following exlusion:
property "sonar.coverage.exclusions", "'**/config', '**/configuration', '**/dtos', '**/*Config*', '**/*Configuration*','**/*Dto*'"
During CI/CD build I see in logs that this option was picked:
Indexing files... Project configuration: Excluded sources for coverage: '**/config', '**/configuration', '**/dtos', '**/*Config*', '**/*Configuration*', '**/*Dto*'
But when I open project in sonarcloud, not all files/folders are excluded from code coverage analysis. As you could see in screenshot below, only folder
dtos was excluded, but based on the definition of coverage exclusions also
configuration should be excluded.
Same goes for the content of
config folder, based on the definition of coverage exclusions all files inside should be excluded, but for some reason one file isn`t (see screenshot below).
Any suggestions what could be wrong?