mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Configure plugin AST printer to ignore comments and only print one file
This commit is contained in:
@@ -20,7 +20,9 @@ external string selectedSourceFile();
|
||||
* Hook to customize the functions printed by this query.
|
||||
*/
|
||||
class Cfg extends PrintAstConfiguration {
|
||||
override predicate shouldPrintFunction(FuncDef func) {
|
||||
func.getFile() = getEncodedFile(selectedSourceFile())
|
||||
}
|
||||
override predicate shouldPrintFunction(FuncDef func) { shouldPrintFile(func.getFile()) }
|
||||
|
||||
override predicate shouldPrintFile(File file) { file = getEncodedFile(selectedSourceFile()) }
|
||||
|
||||
override predicate shouldPrintComments(File file) { none() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user