-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX: Transformation from SARIF 1.0 to 2.x throws Argument-Out-of-Range exception if result.locations is an empty array #1527
Conversation
src/ReleaseHistory.md
Outdated
* API BREAKING: The `Init` methods in the Autogenerated SARIF object model classes are now `protected virtual`. This enables derived classes to add additional properties without having to copy the entire code of the `Init` method. | ||
* BUGFIX: Transformation from SARIF 1.0 to 2.x throws Argument-Out-of-Range exception if `result.locations` is an empty array. https://github.com/microsoft/sarif-sdk/issues/1526 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argument-Out-of-Range exceptio [](start = 54, length = 30)
May as well just say the type name ArgumentOutOfRangeException
. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"results": [ | ||
{ | ||
"ruleId": "WS099", | ||
"level": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"level": "error", [](start = 9, length = 18)
Question: ok, i manually edited this before uploading the file. The version which was sent to us had this value as "5". This failed for me when i plugged it as a unit test case. I just want to understand how this works for our customers? where does the enum conversion happen? #WontFix
@@ -50,9 +50,11 @@ | |||
<None Remove="TestData\SarifVersionOneToCurrentVisitor\ExpectedOutputs\MinimumWithLanguage.sarif" /> | |||
<None Remove="TestData\SarifVersionOneToCurrentVisitor\ExpectedOutputs\NestedInnerExceptionsInNotifications.sarif" /> | |||
<None Remove="TestData\SarifVersionOneToCurrentVisitor\ExpectedOutputs\OneRunWithAllReportingDescriptors.sarif" /> | |||
<None Remove="TestData\SarifVersionOneToCurrentVisitor\ExpectedOutputs\WebScout.sarif" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebScout [](start = 75, length = 8)
This is an internal tool. I suggest:
- Rename it to something like V1ZeroLengthLocationsArray.sarif
- Strip it down to the absolute minimum file that demonstrates the problem. One result, no optional properties... just what you need to trigger the bug. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result.locations
is an empty array. Transformation from SARIF 1.0 to 2.x throws Argument-out-of-range exception if result.locations is an empty array #1526