Skip to content

Commit

Permalink
Rust: ignore crate graph elements from summary stats
Browse files Browse the repository at this point in the history
These elements depend on the version of the standard libraries and platform
  • Loading branch information
aibaars committed Dec 11, 2024
1 parent 889ced8 commit 7419e77
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion rust/ql/src/queries/summary/SummaryStats.ql
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ import codeql.rust.Concepts
import codeql.rust.Diagnostics
import Stats

class CrateElement extends Element {
CrateElement() {
this instanceof ModuleContainer or
this instanceof Type or
this instanceof ValueItem or
this instanceof TypeItem or
this instanceof VariantData or
this instanceof EnumVariant
}
}

from string key, int value
where
key = "Elements extracted" and value = count(Element e | not e instanceof Unextracted)
key = "Elements extracted" and
value = count(Element e | not e instanceof Unextracted and not e instanceof CrateElement)
or
key = "Elements unextracted" and value = count(Unextracted e)
or
Expand Down

0 comments on commit 7419e77

Please sign in to comment.