We’ve encountered an issue where SonarQube is detecting unchanged files and code as new code during analysis. These files have not been modified since the last scan, yet they are being flagged as new, which is impacting our quality gate metrics and creating noise in our reports.
This behavior is observed across several projects and environments. We’ve confirmed that the files in question have not been altered, and their timestamps remain unchanged. We are using the SonarQube version 9.9.1
Steps to Reproduce:
- Run a scan on a project with a baseline established.
- Check the results for files flagged as new code.
- Compare the flagged files to the previous version, noting no changes were made.
Expected Behavior: Only files with actual modifications should be detected as new code.
Actual Behavior: Unchanged files and code are incorrectly flagged as new.
Additional Context: We’ve tried clearing the cache, restarting the analysis process, and reviewing the documentation, but the issue persists. Could this be a misconfiguration, or is there a known issue in this version of SonarQube?
Any assistance or guidance to resolve this would be greatly appreciated.
Thank you