-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(errors): consolidate multiple sarif reports into a single report
Signed-off-by: royalpinto007 <[email protected]>
- Loading branch information
1 parent
7c8e8ec
commit 162729c
Showing
3 changed files
with
261 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// REQUIRED_ARGS: -verror-style=sarif | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
{ | ||
"version": "2.1.0", | ||
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0.json", | ||
"runs": [{ | ||
"tool": { | ||
"driver": { | ||
"name": "Digital Mars D", | ||
"version": "$r:\d+\.\d+\.\d+$", | ||
"informationUri": "https://dlang.org/dmd.html" | ||
} | ||
}, | ||
"invocations": [{ | ||
"executionSuccessful": false | ||
}], | ||
"results": [ | ||
{ | ||
"ruleId": "DMD-ERROR", | ||
"message": { | ||
"text": "undefined identifier `x`" | ||
}, | ||
"level": "error", | ||
"locations": [{ | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "fail_compilation/sarifmultiple_test.d" | ||
}, | ||
"region": { | ||
"startLine": 63, | ||
"startColumn": 5 | ||
} | ||
} | ||
}] | ||
}, | ||
{ | ||
"ruleId": "DMD-ERROR", | ||
"message": { | ||
"text": "undefined identifier `y`" | ||
}, | ||
"level": "error", | ||
"locations": [{ | ||
"physicalLocation": { | ||
"artifactLocation": { | ||
"uri": "fail_compilation/sarifmultiple_test.d" | ||
}, | ||
"region": { | ||
"startLine": 64, | ||
"startColumn": 5 | ||
} | ||
} | ||
}] | ||
} | ||
] | ||
}] | ||
} | ||
--- | ||
*/ | ||
|
||
void main() { | ||
x = 5; // Undefined variable to trigger the error | ||
y = 5; // Undefined variable to trigger the error | ||
} |