PR includes files that were not changed

The Sonarqube analysis includes files that were not changed by the developer.
Any advice or redirection to documentation is appreciated.


There’s not a lot of detail here. Are you talking about a PR context or a full analysis?


Thank you for your response.

I’m talking about PR context.
We are using the Developer edition, and the repository is mono repo


Can you provide your full job log, starting from the checkout?

I suspect analysis doesn’t have enough information from the SCM to understand which files are changed in the PR.


Thank you for pointing me to the issue.
I found this in the logs:

WARN: Shallow clone detected, no blame information will be provided. You can convert to non-shallow with ‘git fetch --unshallow’.

INFO: SCM Publisher 0/3 source files have been analyzed

After adjust the checkout and remove depth 1 seems like issue has been resolved.

1 Like