Skip to content

Commit

Permalink
Merge pull request github#14141 from github/alexdenisov/unresolved-as…
Browse files Browse the repository at this point in the history
…t-nodes

Swift: add queries for unresolved AST nodes
  • Loading branch information
MathiasVP authored Sep 6, 2023
2 parents a8e427f + 35e9499 commit 12a717e
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 12a717e

Please sign in to comment.