I have an MSBuild project which is analyzed using Sonar Scanner for MSBuild. I have passed the following sonar.exclusion properties as part of my pipeline script to exclude a folder from the analysis. But all my exclusion combinations fail to actually exclude the files.
/d:sonar.exclusions=\"IxMilia.Dxf/**,IxMilia.Dxf/*,**/IxMilia.Dxf,**/IxMilia.Dxf/**,**/IxMilia.Dxf/**/*,**/IxMilia.Dxf/*.cs,IxMilia.Dxf/*.cs\"
I tried passing the same from the Sonar UI under Analysis Scope, which did not help either.
The sonar output looks like this:
INFO: ------------- Scan IxMilia.Dxf
INFO: Initializer GenericCoverageSensor
INFO: Initializer GenericCoverageSensor (done) | time=0ms
INFO: Base dir: C:\Program Files (x86)\Jenkins\jobs\MCDC_Dev\workspace\IxMilia.Dxf
INFO: Source encoding: UTF-8, default locale: en_IN
INFO: Index files
INFO: Excluded sources:
INFO: IxMilia.Dxf/**
INFO: IxMilia.Dxf/*
INFO: **/IxMilia.Dxf
INFO: **/IxMilia.Dxf/**
INFO: **/IxMilia.Dxf/**/*
INFO: **/IxMilia.Dxf/*.cs
INFO: IxMilia.Dxf/*.cs
INFO: Analyzer working directory contains 5 .pb file(s)
INFO: 200 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
As you can see from the output the logs, I want to exclude the folder present at the root of the workspace C:\Program Files (x86)\Jenkins\jobs\MCDC_Dev\workspace\IxMilia.Dxf
The IxMilia.Dxf folder contains .cs files which are referred while building the cs project.
Any help on this is appreciated.
INFO: Excluded sources: INFO: mc-design-converter/IxMilia.Dxf/** INFO: Analyzer working directory contains 5 .pb file(s) INFO: 200 files indexed INFO: 0 files ignored because of inclusion/exclusion patterns- amal jayaraj