From c462bc024352feede7f7fe4f8cd943cec931f01a Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 30 May 2023 11:41:59 +0100 Subject: [PATCH] Use edges from select clause --- .github/codeql/queries/assert-pure.ql | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/codeql/queries/assert-pure.ql b/.github/codeql/queries/assert-pure.ql index 49535d5d6..63d9c8774 100644 --- a/.github/codeql/queries/assert-pure.ql +++ b/.github/codeql/queries/assert-pure.ql @@ -27,10 +27,6 @@ Import getANonTypeOnlyImport(Module m) { result = m.getAnImport() and not result.(ImportDeclaration).isTypeOnly() } -Module getANonTypeOnlyImportedModule(Module m) { - result = getANonTypeOnlyImport(m).getImportedModule() -} - query predicate edges(AstNode a, AstNode b) { getANonTypeOnlyImport(a) = b or a.(Import).getImportedModule() = b @@ -39,6 +35,6 @@ query predicate edges(AstNode a, AstNode b) { from Module m, VSCodeImport v where m.getFile() instanceof PureFile and - getANonTypeOnlyImport(getANonTypeOnlyImportedModule*(m)) = v + edges+(m, v) select m, m, v, "This module is not pure: it has a transitive dependency on the vscode API imported $@", v, "here"