mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
JavaScript: Open-source extractor.
This commit is contained in:
2
javascript/extractor/tests/excludes/input/.jshintignore
Normal file
2
javascript/extractor/tests/excludes/input/.jshintignore
Normal file
@@ -0,0 +1,2 @@
|
||||
f/bar*.js
|
||||
baz/
|
||||
1
javascript/extractor/tests/excludes/input/a.js
Normal file
1
javascript/extractor/tests/excludes/input/a.js
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
javascript/extractor/tests/excludes/input/baz/a.js
Normal file
1
javascript/extractor/tests/excludes/input/baz/a.js
Normal file
@@ -0,0 +1 @@
|
||||
console.log("Nor this.");
|
||||
1
javascript/extractor/tests/excludes/input/f/bar.js
Normal file
1
javascript/extractor/tests/excludes/input/f/bar.js
Normal file
@@ -0,0 +1 @@
|
||||
console.log("And neither will this.");
|
||||
1
javascript/extractor/tests/excludes/input/f/empty.json
Normal file
1
javascript/extractor/tests/excludes/input/f/empty.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
javascript/extractor/tests/excludes/input/f/foo.js
Normal file
1
javascript/extractor/tests/excludes/input/f/foo.js
Normal file
@@ -0,0 +1 @@
|
||||
console.log("This file will not be extracted.");
|
||||
5
javascript/extractor/tests/excludes/options.json
Normal file
5
javascript/extractor/tests/excludes/options.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"exclude": ["**/foo.js"],
|
||||
"exclude-path": [".jshintignore"],
|
||||
"include": ["**/*.json"]
|
||||
}
|
||||
50
javascript/extractor/tests/excludes/output/trap/a.js.trap
Normal file
50
javascript/extractor/tests/excludes/output/trap/a.js.trap
Normal file
@@ -0,0 +1,50 @@
|
||||
#10000=@"/a.js;sourcefile"
|
||||
files(#10000,"/a.js","a","js",0)
|
||||
#10001=@"/;folder"
|
||||
folders(#10001,"/","")
|
||||
containerparent(#10001,#10000)
|
||||
#10002=@"loc,{#10000},0,0,0,0"
|
||||
locations_default(#10002,#10000,0,0,0,0)
|
||||
hasLocation(#10000,#10002)
|
||||
#20000=@"global_scope"
|
||||
scopes(#20000,0)
|
||||
#20001=@"script;{#10000},1,1"
|
||||
toplevels(#20001,0)
|
||||
#20002=@"loc,{#10000},1,1,1,2"
|
||||
locations_default(#20002,#10000,1,1,1,2)
|
||||
hasLocation(#20001,#20002)
|
||||
#20003=*
|
||||
stmts(#20003,2,#20001,0,"42")
|
||||
hasLocation(#20003,#20002)
|
||||
stmtContainers(#20003,#20001)
|
||||
#20004=*
|
||||
exprs(#20004,3,#20003,0,"42")
|
||||
hasLocation(#20004,#20002)
|
||||
enclosingStmt(#20004,#20003)
|
||||
exprContainers(#20004,#20001)
|
||||
literals("42","42",#20004)
|
||||
#20005=*
|
||||
lines(#20005,#20001,"42","")
|
||||
hasLocation(#20005,#20002)
|
||||
numlines(#20001,1,1,0)
|
||||
#20006=*
|
||||
tokeninfo(#20006,3,#20001,0,"42")
|
||||
hasLocation(#20006,#20002)
|
||||
#20007=*
|
||||
tokeninfo(#20007,0,#20001,1,"")
|
||||
#20008=@"loc,{#10000},1,3,1,2"
|
||||
locations_default(#20008,#10000,1,3,1,2)
|
||||
hasLocation(#20007,#20008)
|
||||
#20009=*
|
||||
entry_cfg_node(#20009,#20001)
|
||||
#20010=@"loc,{#10000},1,1,1,0"
|
||||
locations_default(#20010,#10000,1,1,1,0)
|
||||
hasLocation(#20009,#20010)
|
||||
#20011=*
|
||||
exit_cfg_node(#20011,#20001)
|
||||
hasLocation(#20011,#20008)
|
||||
successor(#20003,#20004)
|
||||
successor(#20004,#20011)
|
||||
successor(#20009,#20003)
|
||||
numlines(#10000,1,1,0)
|
||||
filetype(#10000,"javascript")
|
||||
@@ -0,0 +1,18 @@
|
||||
#10000=@"/f/empty.json;sourcefile"
|
||||
files(#10000,"/f/empty.json","empty","json",0)
|
||||
#10001=@"/f;folder"
|
||||
folders(#10001,"/f","f")
|
||||
#10002=@"/;folder"
|
||||
folders(#10002,"/","")
|
||||
containerparent(#10002,#10001)
|
||||
containerparent(#10001,#10000)
|
||||
#10003=@"loc,{#10000},0,0,0,0"
|
||||
locations_default(#10003,#10000,0,0,0,0)
|
||||
hasLocation(#10000,#10003)
|
||||
#20000=*
|
||||
json(#20000,5,#10000,0,"{}")
|
||||
#20001=@"loc,{#10000},1,1,1,2"
|
||||
locations_default(#20001,#10000,1,1,1,2)
|
||||
hasLocation(#20000,#20001)
|
||||
numlines(#10000,1,0,0)
|
||||
filetype(#10000,"json")
|
||||
Reference in New Issue
Block a user