We’re having problems setting the exclusions for our solution.
We have an Azure DevOps Build Pipeline that uses the SonarQube extension. Our Build Pipeline looks like this:
SonarQube version 220.127.116.1143 runs on an Azure VM and we have the following exclusions configured :
Note: there are no inclusions configured.
However, the exclusions do not provide the expected results. For example, I still see the folder /Content/ in the Code section in SonarQube and I have more than 321k lines of .css (of which most are third party and in the folder /Content/).
Another example you can see in the snippet below. I would expect that the /Scripts/ folder would be excluded, but they are not. There are 12293 files in the /Scripts/ folder, but there are only 5729 files excluded and that is not because of the exclusions that I have set (if we remove the exclusions I still get the 5729 files ignored message). So I can still see the Scripts folder in the Code section in SonarQube.
Scripts/kendo/cultures/kendo.culture.am-ET.js, Scripts/kendo/cultures/kendo.culture.am.js, Scripts/kendo/cultures/kendo.culture.ar-AE.js, Scripts/kendo/cultures/kendo.culture.ar-BH.js, Scripts/kendo/cultures/kendo.culture.ar-DZ.js, Scripts/kendo/cultures/kendo.culture.ar-EG.js, Scripts/kendo/cultures/kendo.culture.ar-IQ.js, Scripts/kendo/cultures/kendo.culture.ar-JO.js, Scripts/kendo/cultures/kendo.culture.ar-KW.js, Scripts/kendo/cultures/kendo.culture.ar-LB.js, Scripts/kendo/cultures/kendo.culture.ar-LY.js, Scripts/kendo/cultures/kendo.culture.ar-MA.js, Scripts/kendo/cultures/kendo.culture.ar-OM.js, Scripts/kendo/cultures/kendo.culture.ar-QA.js, Scripts/kendo/cultures/kendo.culture.ar-SA.js, Scripts/kendo/cultures/kendo.culture.ar-SY.js,
INFO: Source encoding: UTF-8, default locale: en_US
INFO: Index files
INFO: Excluded sources:
INFO: 7461 files indexed
INFO: 5729 files ignored because of inclusion/exclusion patterns
I have tried all possible variations I could think of (e.g.
**/Scripts/**/*.*, **/Scripts/**, Scripts/**, **/scripts/**, etc.) in the Source File Exclusions, but nothing seems to work. I also tried to provide the parameters in the Prepare analysis on SonarQube using sonar.exclusions, but that doesn’t work either.
Do you have any suggestions to get this working?