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 18, 2024
1 parent c8d7d0d commit 4c9e103
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 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,23 @@ 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 or
this instanceof ImplItem or
this instanceof TypeBoundType
}
}

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 4c9e103

Please sign in to comment.