-
Notifications
You must be signed in to change notification settings - Fork 88
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
Eliminate need to specify the SARIF contract resolver. All serializat… #1103
Changes from 7 commits
2dd4124
7532972
c405958
cd8ba1d
049f32f
742fd9c
39b01f7
9ede737
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 |
---|---|---|
|
@@ -20,6 +20,15 @@ | |
"copyright": "Copyright (c) 2016 by Example Corporation. All rights reserved." | ||
} | ||
}, | ||
"versionControlProvenance": [ | ||
{ | ||
"uri": "https://github.com/contoso/example", | ||
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.
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. microsoft has created a contoso organization on github.com, do you see an issue using it? In reply to: 221319843 [](ancestors = 221319843) 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. |
||
"branch": "master", | ||
"tag": "beta1", | ||
"revisionId": "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd", | ||
"timestamp": "2016-07-16T00:00:00Z" | ||
} | ||
], | ||
"originalUriBaseIds": { "TOOLS_ROOT": "file:///bin/tools/" }, | ||
"invocations": [ | ||
{ | ||
|
@@ -150,7 +159,8 @@ | |
"#TOOLS_ROOT#codescanner/config/collections.rsp": { | ||
"contents": { | ||
"text": "\"-input src/collections/*.cpp -log out/collections.sarif -rules all -disable C9999\"." | ||
} | ||
}, | ||
"lastModifiedTime": "2016-07-16T05:37:57Z" | ||
} | ||
}, | ||
"logicalLocations": { | ||
|
@@ -253,7 +263,12 @@ | |
"text": "Variable \"ptr\" declared." | ||
} | ||
}, | ||
"module": "platform" | ||
"module": "platform", | ||
"executionOrder": 1, | ||
"timestamp": "2016-07-16T08:01:00Z", | ||
"kind": "declaration", | ||
"nestingLevel": 0, | ||
"state": { "value": "[Not initialized}" } | ||
}, | ||
{ | ||
"step": 2, | ||
|
@@ -272,7 +287,9 @@ | |
}, | ||
"fullyQualifiedLogicalName": "collections::list:add" | ||
}, | ||
"module": "platform" | ||
"module": "platform", | ||
"executionOrder": 2, | ||
"timestamp": "2016-07-16T08:02:00Z" | ||
}, | ||
{ | ||
"step": 3, | ||
|
@@ -294,7 +311,10 @@ | |
"text": "Uninitialized variable \"ptr\" passed to method \"add_core\"." | ||
} | ||
}, | ||
"module": "platform" | ||
"module": "platform", | ||
"executionOrder": 3, | ||
"timestamp": "2016-07-16T08:03:00Z", | ||
"kind": "call" | ||
} | ||
] | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,11 +58,18 @@ public void ResultMatchingBaseliner_BaselinesTwoSimpleSarifLogs() | |
AbsentResultProperties.Should().ContainKey("Run"); | ||
AbsentResultProperties["Run"].Should().BeEquivalentTo(baselineLog.Runs[0].InstanceGuid); | ||
|
||
calculatedNextBaseline.Runs[0].Results.Where(r => r.BaselineState == BaselineState.Existing).Should().HaveCount(currentLog.Runs[0].Results.Count - 1); | ||
|
||
calculatedNextBaseline.Runs[0].Results.Where(r => r.BaselineState == BaselineState.Existing).First().TryGetProperty(SarifLogResultMatcher.ResultMatchingResultPropertyName, out Dictionary<string, string> CurrentResultProperties).Should().BeTrue(); | ||
CurrentResultProperties.Should().ContainKey("Run"); | ||
CurrentResultProperties["Run"].Should().BeEquivalentTo(currentLog.Runs[0].InstanceGuid); | ||
int existingCount = currentLog.Runs[0].Results.Count - 1; | ||
calculatedNextBaseline.Runs[0].Results.Where(r => r.BaselineState == BaselineState.Existing).Count().Should().Be(existingCount); | ||
|
||
if (existingCount > 0) | ||
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 a fix for a bug in a test that produces random content (that happened to fail intermittently in one of my validation runs) #Resolved |
||
{ | ||
// In the event that we generated a SARIF run of only a single result, we will not have an 'existing' match | ||
// since we adjusted the sole result value by adding a property to it. | ||
calculatedNextBaseline.Runs[0].Results.Where(r => r.BaselineState == BaselineState.Existing).First().TryGetProperty(SarifLogResultMatcher.ResultMatchingResultPropertyName, out Dictionary<string, string> CurrentResultProperties).Should().BeTrue(); | ||
CurrentResultProperties.Should().ContainKey("Run"); | ||
CurrentResultProperties["Run"].Should().BeEquivalentTo(currentLog.Runs[0].InstanceGuid); | ||
} | ||
|
||
calculatedNextBaseline.Runs[0].Results.Where(r => r.BaselineState == BaselineState.New).Should().HaveCount(1); | ||
|
||
|
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.
BUG: You created the
settings
object but then didn't use it. #Resolved