We are using Sonarcloud via sonar-scanner brew formula. It is also integrated with our Github PRs.
We have spotted that Sonar fails to properly detect total number of lines changed when there are files being moved. Check the following screenshots from Sonarcloud UI and Github interface:
This error prevents us from merging as quality gate fails due to PR being too large. Are we missing something in Sonar’s config for it to detect properly moved files?
Thanks for reporting this. Could you provide me with the background task ID of the scan of the impacted PR? You can do this by navigating to your project page on SonarCloud > Administration > Background tasks.
We currently don’t have any plans on adding support for detecting moved files for PR analysis. If you regularly encounter this case I would suggest removing this rule from your quality gate. Apologies for the inconvenience.