-
Notifications
You must be signed in to change notification settings - Fork 94
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
Adding PerFingerprint strategy in SarifWorkItemFiler #2293
Adding PerFingerprint strategy in SarifWorkItemFiler #2293
Conversation
@@ -232,6 +232,11 @@ public virtual IReadOnlyList<SarifLog> SplitLogFile(SarifLog sarifLog) | |||
partitionFunction = (result) => result.ShouldBeFiled() ? result.GetPerRepositoryFingerprintSplittingStrategyId() : null; | |||
break; | |||
} | |||
case SplittingStrategy.PerFingerprint: | |||
{ | |||
partitionFunction = (result) => result.ShouldBeFiled() ? result.Fingerprints.Count == 0 ? null : result.Fingerprints.First().Value : null; |
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.
First() [](start = 145, length = 7)
I'm fixating on "First" here. In this splitting strategy, if there are multiple results with the same fingerprint, the rest after the first will be discarded, right? Is that desired?
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.
i didn't want to hard code a specific key...its why i added first. i could also add a parameter being the fingerprint name.
In reply to: 581473453 [](ancestors = 581473453)
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.
I have no strong preference so long as we're preserving all the intended information :)
In reply to: 581474839 [](ancestors = 581474839,581473453)
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.
options.SplittingStrategy == SplittingStrategy.PerPropertyBagProperty) && | ||
string.IsNullOrEmpty(options.PropertyName)) | ||
{ | ||
valid &= false; |
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.
valid &= false [](start = 16, length = 14)
You can do this, but valid = false is also fine. :)
No description provided.