Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved annotations can be excluded from both counts, inflating the reported resolution percentage.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds Rust type-mention quality statistics to support the DCA resolvability summary.
Changes:
- Defines counts and a percentage for resolvable type mentions.
- Exposes these metrics through extractor telemetry.
| File | Description |
|---|---|
| rust/ql/src/queries/telemetry/ExtractorInformation.ql | Emits type-mention metrics. |
| rust/ql/src/queries/telemetry/DatabaseQuality.qll | Defines type-mention classification and statistics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| module TypeMentionStats implements StatsSig { | ||
| additional class Candidate extends TypeMention { |
There was a problem hiding this comment.
@hvitved how would you prefer this metric be constructed? My only real interest in this is making the DCA report clean of errors and thus easier to read.
There was a problem hiding this comment.
I was gonna point out exactly this issue. I wasn't aware adding the report to all languages would result en errors for languages that do not supply the data, so perhaps we should just move the report so it only applies to Unified.
There was a problem hiding this comment.
So I think we should close this PR and make an internal DCA fix instead.

Add type mentions to the database quality stats for Rust. It looks like this metric was added for unified, while the corresponding DCA summary table "Percentage of resolvable type mentions, per source" was added for all languages - resulting in a table of errors for other languages. This pull request should fix that issue for Rust.
In all the projects I tried this on, the metric is > 99%.