SonarCloud isn't respecting sonar.sources

I have sonar.sources=my-directory set however my scans are still referencing a lot of issues found in another directory that isn’t nested within my-directory. I’m using a sonarcloud.properties config file.

What am I missing?

Hello @CWSites
and welcome to the SonarSource community.
Questions for you:

  • Are you sure your project is analyzed by SonarCloud Automatic Analysis, and only by this automatic analysis?
  • Have you stored your .sonarcloud.properties file (note the initial ‘.’) at the root folder of your github repository?

Let me know.

I didn’t have the initial . I’ll give that a shot and see if that is the issue.

1 Like

Hello @CWSites
Did you have the time to check with the initial “.” for your project sonarcloud properties file?

I have an outstanding PR which should hopefully be merged today with the change. Fingers crossed!

2 Likes

That did the trick, thank you so much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.