Merge pull request #20312 from geoffw0/dbquality

Rust: Tune rust/diagnostic/database-quality
This commit is contained in:
Geoffrey White
2025-08-29 13:04:46 +01:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
---
category: fix
---
* The "Low Rust analysis quality" query (`rust/diagnostic/database-quality`) has been tuned so that it won't trigger on databases that have extracted normally. This will remove spurious messages of "Low Rust analysis quality" on the CodeQL status page.

View File

@@ -12,11 +12,9 @@ import codeql.util.Unit
class DbQualityDiagnostic extends Unit {
DbQualityDiagnostic() {
exists(float percentageGood |
CallTargetStatsReport::percentageOfOk(_, percentageGood)
CallTargetStatsReport::percentageOfOk(_, percentageGood) and percentageGood < 50
or
MacroCallTargetStatsReport::percentageOfOk(_, percentageGood)
|
percentageGood < 95
MacroCallTargetStatsReport::percentageOfOk(_, percentageGood) and percentageGood < 50
)
}