Summary
Hi, I have experimented that issues that are identical to previously fixed ones (same file, same lines, same content) are not categorized as New Code but instead fall under Overall Code, causing the Quality Gate to pass.
Would this be considered expected behavior, or is it a bug? Any clarification would be appreciated.
Steps to Reproduce
- Initial Scan:
- Introduce a new issue in the code.
- The Quality Gate fails, correctly detecting it as a New Code issue.
- Fix Implementation:
- Remove the problematic code to fix the issue.
- SonarQube detects the fix and removes the issue as expected.
- Issue Reintroduction:
- Create a new version of the code.
- Reintroduce the exact same issue (same file, same lines, same content).
- Unexpected Behavior: The Quality Gate passes instead of failing.
- The issue is detected but categorized under Overall Code instead of New Code.
Expected Behavior
The reintroduced issue should be treated as New Code, triggering a Quality Gate failure, regardless of whether it previously existed in an earlier version.
This behavior only occurs when the reintroduced issue is identical to the previously fixed one (same location and content).
Environment
- SonarQube Edition: Community
- Version: v25.1.0.102122
- Deployment: Docker