How to force sonarcloud to rescan my project after changing settings in sonar-project.properties

I have a bumch of files that i do not wish to be scanned, i added them to the exclude in sonar-project.properties and checked it in . i still see those files marked with errors when looking in the “overall code”. how do i force it to rescan so it will include those existing files.

Just to make sure i configure it correctly
I set sources to sonar.sources=src/
and sonar.exclusions=repos/*

my files i want to ignore are at src/repos including many subdirectories i want excluded as well

You’ll need to retrigger the sonar-scanner however you did the first time, but now with these settings set.

Not much help
The scan was triggered automatically when i added the repo.
As someone who is new to Sonar that answer didnt really give me any direction to go on

Well, you’ve filed this post under the SonarQube category, but your last post makes it sound like you’re using Automatic Analysis which is only available on SonarCloud. Is that correct?

If so, a new analysis can be triggered by pushing a new commit to your main branch. It sounds like you’ve done that.

Looking at your sonar.exclusions setting, this would only exclude files directly under repos/. If you want to exclude all files of all directories in src/repos, I would suggest an exclusion like **/repos/**

thanks
It worked

1 Like