mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Add failing TRAP test for trailing comma
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"array": [
|
||||
"foo",
|
||||
"bar",
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#10000=@"/array-trailing-comma.json;sourcefile"
|
||||
files(#10000,"/array-trailing-comma.json")
|
||||
#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: Omitted elements are not allowed in JSON.")
|
||||
#20001=@"loc,{#10000},5,4,5,4"
|
||||
locations_default(#20001,#10000,5,4,5,4)
|
||||
hasLocation(#20000,#20001)
|
||||
numlines(#10000,6,0,0)
|
||||
filetype(#10000,"json")
|
||||
Reference in New Issue
Block a user