In one of our projects we want to exclude all css files currently stored in a folder called FranceFiles. When we add **/FranceFiles/*.css to the exclusion, they still get included in the analysis. Any ideas?
Folder where the css resides is: Src/XXX.YYY/Tests/XXX.YYY.Common.Tests/Helpers/FranceFiles
Hi @janos,
We use Azure DevOps (cloud version), and have the Sonarcloud extension installed. Build is done by MSBuild.
We have the following Coverage exclusion:
Hi @janos, if you have any info on what we can best do, please indicate. Right now we set all issues to resolve as won’t fix, but would be better if we got the file exclusion to work.
Hi @zaat, sorry about the late response. When you say the files still get included in the analysis, how do you mean exactly? What are you observing that makes you think this is the case? For example, do you see those files on the Code tab on SonarCloud? (For the record, I was not able to reproduce the issue, files seem to get correctly excluded with that kind of pattern, regardless of directory depth.)
Hi @janos,
I just setup an additional (new) project for the team that is experiencing the issue. With the same code, same exclusions, same issue persists. I can send you the details of the team/org/appl if you want to investigate?
Files under folders named Tests are considered test files, which is different from source files. To exclude these CSS files, please use the Test File Exclusions setting.
Thanks for checking. I tried, when I put **/FranceFiles/*.css in the test file exclusion it only works if I add the same location in the source file exclusion.
So only as source file exclusion, or only as test file exclusion does not work. Then these files are analyzed. Only if I add the exclusion on both (Source file and test file) they are excluded. Does seem like something to fix I think ?
Anyway, works for me now. Thanks for your support!