Skip to content

Commit e8953fb

Browse files
committed
Rust: Add diagnostic query for AST inconsistency counts.
1 parent e01ecd1 commit e8953fb

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @name Abstract syntax tree inconsistency counts
3+
* @description Counts the number of abstract syntax tree inconsistencies of each type. This query is intended for internal use.
4+
* @kind diagnostic
5+
* @id rust/diagnostics/ast-consistency-counts
6+
*/
7+
8+
import rust
9+
import codeql.rust.AstConsistency as Consistency
10+
11+
// see also `rust/diagnostics/ast-consistency`, which lists the
12+
// individual inconsistency results.
13+
from string type, int num
14+
where num = Consistency::getAstInconsistencyCounts(type)
15+
select type, num
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| Multiple locations | 0 |
2+
| Multiple parents | 0 |
3+
| Multiple primary QL classes | 0 |
4+
| Multiple toStrings | 0 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
queries/diagnostics/AstConsistencyCounts.ql

0 commit comments

Comments
 (0)