-
Notifications
You must be signed in to change notification settings - Fork 93
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
Incorporate schema changes for versionControlDetails.mappedTo and rule.deprecatedIds #1198
Changes from all commits
3353e40
63a60a0
a981dc6
07a555f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,11 @@ | |
"branch": "master", | ||
"tag": "beta1", | ||
"revisionId": "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd", | ||
"timestamp": "2016-07-16T00:00:00Z" | ||
"timestamp": "2016-07-16T00:00:00Z", | ||
"mappedTo": { | ||
"uri": "/example", | ||
"uriBaseId": "SRCROOT" | ||
} | ||
} | ||
], | ||
"originalUriBaseIds": { "TOOLS_ROOT": "file:///bin/tools/" }, | ||
|
@@ -401,14 +405,6 @@ | |
] | ||
} | ||
], | ||
"provenance": { | ||
"firstDetectionTimeUtc": "2018-07-15T14:20:42Z", | ||
"firstDetectionRunInstanceGuid": "8F62D8A0-C14F-4516-9959-1A663BA6FB99", | ||
"lastDetectionTimeUtc": "2018-07-16T14:20:42Z", | ||
"lastDetectionRunInstanceGuid": "BC650830-A9FE-44CB-8818-AD6C387279A0", | ||
"invocationIndex": 0, | ||
"conversionSources": [] | ||
}, | ||
"fixes": [ | ||
{ | ||
"description": { | ||
|
@@ -439,6 +435,10 @@ | |
"rules": { | ||
"C2001": { | ||
"id": "C2001", | ||
"deprecatedIds": [ | ||
"C0001", | ||
"C1001" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the only change you should retain in this file. |
||
], | ||
"shortDescription": { | ||
"text": "A variable was used without being initialized." | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ public void RebaseUriVisitor_VisitFileData_RebasesAllTheThings() | |
visitor.FileDataKeys.Where(k => k != null && k.StartsWith(uriRootText)).Count().Should().Be(3); | ||
visitor.FileDataKeys.Where(k => k != null && k.StartsWith("#" + toolsRootBaseId + "#")).Count().Should().Be(1); | ||
|
||
int uriCount = 16; | ||
int uriCount = 17; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because we fixed that bug in the comprehensive sample that had the effect of adding another There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand. The prerelease transformer should have created file locations from everything in the comprehensive sarif file. Are you masking a bug here because you brought the comprehensive sarif up to date in this regard? In reply to: 244756655 [](ancestors = 244756655) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the additional file location is the one that you introduced in the 'mappedTo' property. the transformer is doing the right thing. In reply to: 244871107 [](ancestors = 244871107,244756655) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
visitor.FileLocationUriBaseIds.Count.Should().Be(uriCount); | ||
visitor.FileLocationUriBaseIds.Where(u => u == null).Count().Should().Be(13); | ||
|
@@ -240,7 +240,7 @@ public void RebaseUriVisitor_VisitFileData_RebasesAllTheThings() | |
visitor.FileLocationUriBaseIds.Where(u => u == toolsRootBaseId).Count().Should().Be(3); | ||
visitor.FileLocationUriBaseIds.Where(u => u == agentRootBaseId).Count().Should().Be(11); | ||
|
||
visitor.FileLocationUris.Count.Should().Be(17); | ||
visitor.FileLocationUris.Count.Should().Be(uriCount + 1); | ||
|
||
// The AGENT_ROOT originalUriBaseId is the last thing that will include the uriRootText value | ||
visitor.FileLocationUris.Where(u => u != null && u.StartsWith(uriRootText)).Count().Should().Be(1); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -873,6 +873,7 @@ public virtual VersionControlDetails VisitVersionControlDetails(VersionControlDe | |
{ | ||
if (node != null) | ||
{ | ||
node.MappedTo = VisitNullChecked(node.MappedTo); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Note that |
||
} | ||
|
||
return node; | ||
|
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.
This is the change. The rest is C#7 housekeeping. #ByDesign