Error observed: As the title says, when SonarCloud analyses a pull request that changes the location of a file, it treats old code as new code and fails the quality gate.
Is there any suggested workaround to pass the quality gate or a way to inform Sonar that the two files are the same?
Hi,
SonarCloud detects file moves/renames when analyzing branches but currently that doesn’t work for Pull Requests when the changes are detected from the SCM. I’m afraid there is no workaround. Once you merge the pull request, the file move will probably be detected in the branch and in that case it won’t count towards “new code” in the New Code Period.