Refactoring ValidatorBase#534
Conversation
Are you sure you require these helpers now? Trying removing them. i.e., any Dictionary instance should resolve to the IDictionary helpers below, I believe. In reply to: 898930832 In reply to: 898930832 Refers to: Src/Plugins/Security/Utilities/DictionaryExtensions.cs:12 in 3b14c3c. [](commit_id = 3b14c3c, deletion_comment = False) |
|
|
||
| var sb = new StringBuilder(); | ||
|
|
||
| var httpAuhorizationRequestHeaderValidator = new HttpAuthorizationRequestHeaderValidator(); |
| "ValidationFingerprintHash/v1": "a82a08b8f8cd5a7eabf30386974158e85fa1f0982b13d273aa94373c2638eb42", | ||
| "AssetFingerprint/v2": "{\"host\":\"example.com\",\"id\":\"lastname\"}", | ||
| "ValidationFingerprint/v2": "{\"host\":\"example.com\",\"id\":\"lastname\"}" | ||
| } |
There was a problem hiding this comment.
we weren't using ValidatorBase, so duplicated results would appear.
With my current change, we will ask for the static or dynamic validator class, removing duplications
| context: TestHelper.ContextSetup()); | ||
|
|
||
| ValidateResult(string.Empty, result, runCount: 1, resultCount: 2, FailureLevel.Note, ignoreRegionContent: true); | ||
| ValidateResult(string.Empty, result, runCount: 1, resultCount: 1, FailureLevel.Note, ignoreRegionContent: true); |
There was a problem hiding this comment.
Before this change, AdoPat validator didn't implemented the ValidatorBase generating duplicated results.
With my current change, we will remove duplicates
|
|
||
| namespace Microsoft.CodeAnalysis.Sarif.PatternMatcher.Sdk | ||
| { | ||
| public abstract class StaticValidatorBase |
| groups.Add("scanTargetFullPath", new FlexMatch() { Value = "GitHitPatTest" }); | ||
|
|
||
| IEnumerable<ValidationResult> validationResults = GitHubPatValidator.IsValidStatic(groups); | ||
| var gitHubPatValidator = new GitHubPatValidator(); |
| "locations": [ | ||
| { | ||
| "physicalLocation": { | ||
| "artifactLocation": { |
There was a problem hiding this comment.
we weren't using ValidatorBase, so duplicated results would appear.
With my current change, we will ask for the static or dynamic validator class, removing duplications
No description provided.