Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust: Count number of CFG inconsistencies #17763

Merged
merged 8 commits into from
Oct 15, 2024
Merged

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Oct 15, 2024

Count the number of CFG inconsistencies in Rust:

  • we already have rust/diagnostics/cfg-consistency which lists each CFG inconsistency in a database. Here I have given this query metadata and moved the logic out into a shared library CfgConsistency.qll.
  • new query rust/diagnostics/cfg-consistency-counts lists the number of inconsistencies of each type in a database.
  • existing query rust/summary/summary-statistics is extended to report the total number of CFG inconsistencies (regardless of type).

The intent is to add the data from the second or third of these to the DCA job, and track it as a metric. I'm leaning towards the third (i.e. just the total) because it's easier to maintain if we add further consistency checks. It does add an extra step to diagnosing any regressions, but that's an investigatory process either way.

A similar PR for AST consistency counts will follow.

@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Oct 15, 2024
Copy link
Contributor

@paldepind paldepind left a comment

Choose a reason for hiding this comment

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

LGTM! :)

@geoffw0 geoffw0 merged commit f9eca42 into github:main Oct 15, 2024
15 checks passed
@geoffw0 geoffw0 deleted the cfgcount3 branch October 29, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants