mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
JavaScript: Handle empty package.json files gracefully.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#10000=@"/package.json;sourcefile"
|
||||
files(#10000,"/package.json","package","json",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=*
|
||||
json_errors(#20000,"Error: Unexpected token")
|
||||
#20001=@"loc,{#10000},1,1,1,1"
|
||||
locations_default(#20001,#10000,1,1,1,1)
|
||||
hasLocation(#20000,#20001)
|
||||
numlines(#10000,0,0,0)
|
||||
filetype(#10000,"json")
|
||||
@@ -0,0 +1,28 @@
|
||||
#10000=@"/tst.js;sourcefile"
|
||||
files(#10000,"/tst.js","tst","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"
|
||||
numlines(#20001,0,0,0)
|
||||
#20002=*
|
||||
tokeninfo(#20002,0,#20001,0,"")
|
||||
#20003=@"loc,{#10000},1,1,1,0"
|
||||
locations_default(#20003,#10000,1,1,1,0)
|
||||
hasLocation(#20002,#20003)
|
||||
toplevels(#20001,0)
|
||||
hasLocation(#20001,#20003)
|
||||
#20004=*
|
||||
entry_cfg_node(#20004,#20001)
|
||||
hasLocation(#20004,#20003)
|
||||
#20005=*
|
||||
exit_cfg_node(#20005,#20001)
|
||||
hasLocation(#20005,#20003)
|
||||
successor(#20004,#20005)
|
||||
numlines(#10000,0,0,0)
|
||||
filetype(#10000,"javascript")
|
||||
Reference in New Issue
Block a user