I am trying to exclude a huge XML file. I am using the exclusions in the SonarCloud UI, but the exclusion is not working. I have ensured the exclusion is case sensitive, but it still doesn’t work.
The exclusion is as follows:
Yet, sonar still analyses the file:
How can I get the exclusion to work correctly?
Can you please share the log of the analysis in debug mode so we can see what is indexing this file ?
Sure - Can I send it privately?
The log is 20MB. I can’t send a zip as it’s not allowed. What do I do?
I actually have no endpoint to give you to post this zip.
Do you have a place where you could put it and give me a download link ?
The logs can be downloaded here.
The exclusion mechanism taking relative paths into account, you cannot set your exclusion pattern as **/iSAMS.Data.SqlClient/Procedures.xml.
By doing this, when the analyser will start analysing the iSAMS.Data.SqlClient withe the below basedir:
INFO: Base dir: C:\vsts-agent\agent\_work\2\s\iSAMS.Data.SqlClient
It will search for a file in the iSAMS.Data.SqlClient\iSAMS.Data.SqlClient directory.
Instead, you can put the following pattern:
**/Procedures.xml and you should get the exclusion working.
Please note that the same applies on your other exclusion patterns, I think particularly about the SqlNetTiersProviders.cs and the DataRepository.cs files.
So given your answer, how do you exclude all files in a specific folder?
I too am facing the same issue.