Skip to content

Commit

Permalink
Swift: add queries for unresolved AST nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Denisov committed Sep 5, 2023
1 parent cb89220 commit 35e9499
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions swift/ql/consistency-queries/UnresolvedAstNodes.ql
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
11 changes: 11 additions & 0 deletions swift/ql/src/diagnostics/internal/UnresolvedAstNodes.ql
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)
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 |

0 comments on commit 35e9499

Please sign in to comment.