Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 09990f9

Browse files
committed
Configure plugin AST printer to ignore comments and only print one file
1 parent b8c4004 commit 09990f9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ql/src/printAst.ql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ external string selectedSourceFile();
2020
* Hook to customize the functions printed by this query.
2121
*/
2222
class Cfg extends PrintAstConfiguration {
23-
override predicate shouldPrintFunction(FuncDef func) {
24-
func.getFile() = getEncodedFile(selectedSourceFile())
25-
}
23+
override predicate shouldPrintFunction(FuncDef func) { shouldPrintFile(func.getFile()) }
24+
25+
override predicate shouldPrintFile(File file) { file = getEncodedFile(selectedSourceFile()) }
26+
27+
override predicate shouldPrintComments(File file) { none() }
2628
}

0 commit comments

Comments
 (0)