"Sonarcloud" doesn't exclude the sources from sonar-project.properties file

After some googling, I have found the below solution and it worked perfectly fine for me.

Steps:

  1. Replace the sonar-project.properties to .sonarcloud.properties
  2. Added the same set of configuration that I had used in the sonar-project.properties file.
  3. Perform the scan analysis through “Sonarcloud”.

Result: It has excluded all the file/folder that I had mentioned in the .sonarcloud.properties file.

Learning: It seems Sonarcloud looks for .sonarcloud.properties file instead of the sonar-project.properties file. I am sure this might have captured in the documentation but unfortunately whatever I have read so far couldn’t see this step.

A clue that triggers to above solution was from this source: SonarCloud sonar.exclusions not working still/again

Happy Learning!

1 Like