| 1 |
{"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json", |
| 2 |
"version": "2.1.0", |
| 3 |
"runs": [{"tool": {"driver": {"name": "FooScanner", |
| 4 |
"rules": []}}, |
| 5 |
"artifacts": [{"location": {"uri": "/this/does/not/exist/test.bas"}, |
| 6 |
"sourceLanguage": "basic", |
| 7 |
"contents": {"text": "label: PRINT \"hello world!\"\n GOTO label\n"}, |
| 8 |
"roles": ["analysisTarget"]}], |
| 9 |
"results": [{"ruleId": "error", |
| 10 |
"level": "error", |
| 11 |
"message": {"text": "'GOTO' is considered harmful"}, |
| 12 |
"locations": [{"physicalLocation": {"artifactLocation": {"uri": "/this/does/not/exist/test.bas"}, |
| 13 |
"region": {"startLine": 2, |
| 14 |
"startColumn": 8, |
| 15 |
"endColumn": 19}, |
| 16 |
"contextRegion": {"startLine": 2, |
| 17 |
"snippet": {"text": " GOTO label\n"}}}}], |
| 18 |
"relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "/this/does/not/exist/test.bas"}, |
| 19 |
"region": {"startLine": 1, |
| 20 |
"startColumn": 1, |
| 21 |
"endColumn": 6}, |
| 22 |
"contextRegion": {"startLine": 1, |
| 23 |
"snippet": {"text": "PRINT \"hello world!\";\n"}}}, |
| 24 |
"message": {"text": "this is the target of the 'GOTO'"}}]}]}]} |
| 25 |
|
| 26 |
/* { dg-begin-multiline-output "" } |
| 27 |
/this/does/not/exist/test.bas:2:8: error: 'GOTO' is considered harmful |
| 28 |
2 | GOTO label |
| 29 |
| ^~~~~~~~~~ |
| 30 |
{ dg-end-multiline-output "" } */ |
| 31 |
/* { dg-begin-multiline-output "" } |
| 32 |
/this/does/not/exist/test.bas:1:1: note: this is the target of the 'GOTO' |
| 33 |
1 | label: PRINT "hello world!" |
| 34 |
| ^~~~~ |
| 35 |
{ dg-end-multiline-output "" } */ |
| 36 |
|
| 37 |
// TODO: trailing [error] |