I’m experiencing a strange behavior in SonarQube with two long-standing projects, Project A and Project B. Both projects have existed for a while across different products, but I’m noticing a discrepancy in how their quality gates are evaluated:
Version: Enterprise/Data Center edition 9.9.6
Project A:
- Quality Gate: Passed
- New Code Statistics:
- 0 New Bugs
- 0 New Vulnerabilities
- 0 New Security Hotspots
- 0 Added Debt
- 0 New Code Smells
- 88.5% Coverage
- 0.0% Duplications
- Overall Code Statistics:
- 121 Bugs
- 89 Vulnerabilities
- 103 Security Hotspots
- 120d Debt
- 12k Code Smells
- 71.4% Code Coverage
- 3.1% Duplications on 305k Lines
Project B:
- Quality Gate: Failed
- New Code Statistics:
- 4 New Bugs
- 0 New Vulnerabilities
- 1 New Security Hotspot
- 20d Added Debt
- 723 New Code Smells
- 16.0% Coverage
- 2.56% Duplications
- Overall Code Statistics:
- 4 Bugs
- 0 Vulnerabilities
- 1 Security Hotspot
- 64d Debt
- 2.6k Code Smells
- 16.0% Code Coverage
- 2.9% Duplications on 98k Lines
My question is:
Why is the quality gate failing for Project B, but not for Project A? Despite Project A having more overall issues, it passes the quality gate, while Project B fails it. What could be the reasons for this discrepancy? Any insights would be appreciated!