-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: SSA inconsistency counts #19235
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (10)
- rust/ql/consistency-queries/SsaConsistency.ql: Language not supported
- rust/ql/integration-tests/hello-project/summary.expected: Language not supported
- rust/ql/integration-tests/hello-workspace/summary.cargo.expected: Language not supported
- rust/ql/integration-tests/hello-workspace/summary.rust-project.expected: Language not supported
- rust/ql/src/queries/diagnostics/SsaConsistencyCounts.ql: Language not supported
- rust/ql/src/queries/summary/Stats.qll: Language not supported
- rust/ql/test/query-tests/diagnostics/SsaConsistencyCounts.expected: Language not supported
- rust/ql/test/query-tests/diagnostics/SsaConsistencyCounts.qlref: Language not supported
- rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected: Language not supported
- shared/ssa/codeql/ssa/Ssa.qll: Language not supported
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
@@ -0,0 +1 @@ | |||
queries/diagnostics/SsaConsistencyCounts.ql |
Check warning
Code scanning / CodeQL
Query test without inline test expectations Warning test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a diagnostic query.
* @id rust/diagnostics/ssa-consistency-counts | ||
*/ | ||
|
||
private import codeql.rust.dataflow.internal.SsaImpl as SsaImpl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps just private import codeql.rust.dataflow.internal.SsaImpl::Consistency
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That exact import causes all the query predicates
in SsaImpl::Consistency
to apply, breaking this query - but private import codeql.rust.dataflow.internal.SsaImpl::Consistency as SsaConsistency
works and is more precise.
I've updated the query.
Provide SSA inconsistency counts:
rust/diagnostics/ssa-consistency
(which has been given metadata).rust/diagnostics/ssa-consistency-counts
.rust/summary/summary-statistics
(via changes inStats.qll
). This data will be used by the DCA report.This required adding a predicate
getInconsistencyCounts
to the sharedSSA.qll
, similar to the one we already have for data flow. This shouldn't be controversial as no existing shared behaviour is changed, but I'm open to suggestions / comments representing all interests of course.