Skip to content

Conversation

@geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Oct 29, 2025

Exclude skipped files in rust/diagnostic/database-quality (i.e. the query that powers the tool status page). Skipped files are files skipped by conditional compilation, so they should not affect metrics, and we should not necessarily expect that calls, macros etc in them are actually resolvable anyway.

Unfortunately the overall effect of this change is quite limited, at least on the MRVA-1000 - only one project in that set that had a tool status page warning before does not have one now (previously 132 projects, now 131). Others have slightly better numbers but have not crossed a threshold. There's more to be done on narrowing down the causes of this issue.

@geoffw0 geoffw0 added the no-change-note-required This PR does not need a change note label Oct 29, 2025
@geoffw0 geoffw0 requested a review from a team as a code owner October 29, 2025 11:51
Copilot AI review requested due to automatic review settings October 29, 2025 11:51
@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Oct 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refines database quality statistics by filtering out files that were skipped during compilation, ensuring metrics only reflect actively compiled code.

  • Introduces a RelevantFile class to exclude compilation-skipped files from statistics
  • Updates all telemetry statistics modules to only count elements from relevant files
  • Clarifies the fromSource() documentation to distinguish source files from dependencies

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
rust/ql/src/queries/telemetry/DatabaseQuality.qll Adds RelevantFile filter and applies it to all statistic counts in CallTargetStats, MacroCallTargetStats, and ExprTypeStats modules
rust/ql/lib/codeql/files/FileSystem.qll Improves documentation for fromSource() predicate to clarify it identifies target project files vs dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geoffw0 geoffw0 merged commit d8fff44 into github:main Oct 31, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants