forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swift: add queries for unresolved AST nodes
- Loading branch information
Alex Denisov
committed
Sep 5, 2023
1 parent
cb89220
commit 35e9499
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import swift | ||
|
||
from AstNode n | ||
where n.getAPrimaryQlClass().matches("Unresolved%") | ||
select n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @name Number of unresolved AST nodes | ||
* @description Count all unresolved AST nodes. | ||
* @kind metric | ||
* @id swift/diagnostics/unresolved-ast-nodes | ||
* @tags summary | ||
*/ | ||
|
||
import swift | ||
|
||
select count(AstNode n | n.getAPrimaryQlClass().matches("Unresolved%") | n) |
2 changes: 2 additions & 0 deletions
2
swift/ql/test/extractor-tests/errors/CONSISTENCY/UnresolvedAstNodes.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
| file://:0:0:0:0 | ... .combine(_:) | | ||
| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr | |