| 1 |
/* Taken from SARIF v2.1.0, Appendix K.2: "Minimal recommended SARIF log |
| 2 |
file with source information". */ |
| 3 |
|
| 4 |
{ |
| 5 |
"version": "2.1.0", |
| 6 |
"runs": [ |
| 7 |
{ |
| 8 |
"tool": { |
| 9 |
"driver": { |
| 10 |
"name": "CodeScanner", |
| 11 |
"rules": [ |
| 12 |
{ |
| 13 |
"id": "C2001", |
| 14 |
"fullDescription": { |
| 15 |
"text": "A variable was used without being initialized. This can result in runtime errors such as null reference exceptions." |
| 16 |
}, |
| 17 |
"messageStrings": { |
| 18 |
"default": { |
| 19 |
"text": "Variable \"{0}\" was used without being initialized." |
| 20 |
} |
| 21 |
} |
| 22 |
} |
| 23 |
] |
| 24 |
} |
| 25 |
}, |
| 26 |
"artifacts": [ |
| 27 |
{ |
| 28 |
"location": { |
| 29 |
"uri": "src/collections/list.cpp", |
| 30 |
"uriBaseId": "SRCROOT" |
| 31 |
}, |
| 32 |
"sourceLanguage": "c" |
| 33 |
} |
| 34 |
], |
| 35 |
"results": [ |
| 36 |
{ |
| 37 |
"ruleId": "C2001", |
| 38 |
"ruleIndex": 0, |
| 39 |
"message": { |
| 40 |
"id": "default", |
| 41 |
"arguments": [ |
| 42 |
"count" |
| 43 |
] |
| 44 |
}, |
| 45 |
"locations": [ |
| 46 |
{ |
| 47 |
"physicalLocation": { |
| 48 |
"artifactLocation": { |
| 49 |
"uri": "src/collections/list.cpp", |
| 50 |
"uriBaseId": "SRCROOT", |
| 51 |
"index": 0 |
| 52 |
}, |
| 53 |
"region": { |
| 54 |
"startLine": 15 |
| 55 |
} |
| 56 |
}, |
| 57 |
"logicalLocations": [ |
| 58 |
{ |
| 59 |
"fullyQualifiedName": "collections::list::add" |
| 60 |
} |
| 61 |
] |
| 62 |
} |
| 63 |
] |
| 64 |
} |
| 65 |
] |
| 66 |
} |
| 67 |
] |
| 68 |
} |
| 69 |
|
| 70 |
/* { dg-begin-multiline-output "" } |
| 71 |
In function 'collections::list::add': |
| 72 |
src/collections/list.cpp:15: warning: Variable "count" was used without being initialized. [C2001] |
| 73 |
{ dg-end-multiline-output "" } */ |