mirror of
https://github.com/hohn/codeql-javascript.git
synced 2025-12-16 14:23:04 +01:00
Sample of generation of dot graph from javascript source
This commit is contained in:
17
queries/printast.ql
Normal file
17
queries/printast.ql
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @name Print AST
|
||||
* @kind graph
|
||||
*/
|
||||
|
||||
import javascript
|
||||
import semmle.javascript.PrintAst
|
||||
|
||||
class PrintAstConfigurationOverride extends PrintAstConfiguration {
|
||||
override predicate shouldPrint(Locatable e, Location l) {
|
||||
super.shouldPrint(e, l) and
|
||||
l.getFile().getBaseName() = "callbacks.js"
|
||||
}
|
||||
}
|
||||
// from File f
|
||||
// where f.getBaseName() = "callbacks.js"
|
||||
// select f
|
||||
3
queries/qlpack.yml
Normal file
3
queries/qlpack.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
name: codeql-custom-queries-javascript
|
||||
version: 0.0.0
|
||||
libraryPathDependencies: codeql-javascript
|
||||
1
queries/queries.xml
Normal file
1
queries/queries.xml
Normal file
@@ -0,0 +1 @@
|
||||
<queries language="javascript"/>
|
||||
Reference in New Issue
Block a user