How exclusions work?

Hi,

I have two questions for you:

1. I’m trying to exclude some files from the analysis, but it doesn’t work as expected.

In pipeline definitions I have

extraProperties: 
            sonar.exclusions=**/obj/**,**/*.dll,**/SomethingGenerator.cs,

In the log, there is:

Excluded sources: **/build-wrapper-dump.json, **/obj/**, **/*.dll, **/SomethingGenerator.cs,

But later in the log, I can find

Too high simulation costs for sink in D:\something\src\Modules\Output\Generator\SomethingGenerator.cs:666. This sink will not be analyzed any further.

So it looks like even though I added that file to exclusions it’s still analyzing it.

2. There is folder created C:\Users\someAdoUser.sonar. Can I somehow specify where it should be created? It’s taking too much space on C drive.

Hey there.

While a file may be excluded from reporting issues, it may still be needed in the context of security analysis which runs based on information generated about your project by your build. If it’s not causing any issues, you can safely ignore that.

Yes, you can adjust sonar.working.directory.