Merged
Conversation
d0654e8 to
d742cca
Compare
ericsciple
commented
Nov 21, 2019
| [DataMember(Name = "owner")] | ||
| private string _owner; | ||
|
|
||
| [DataMember(Name = "severity")] |
Collaborator
Author
There was a problem hiding this comment.
this is the config class the json is deserialized into
ericsciple
commented
Nov 21, 2019
| public sealed class IssueMatch | ||
| { | ||
| public IssueMatch(IssueMatch runningMatch, IssuePattern pattern, GroupCollection groups) | ||
| public IssueMatch(IssueMatch runningMatch, IssuePattern pattern, GroupCollection groups, string defaultSeverity = null) |
Collaborator
Author
There was a problem hiding this comment.
This class is used at runtime when a match is found.
This ctor extracts the properties from the regex match groups, and stores them in first class properties on this class.
ericsciple
commented
Nov 21, 2019
| Message = runningMatch?.Message ?? GetValue(groups, pattern.Message); | ||
| FromPath = runningMatch?.FromPath ?? GetValue(groups, pattern.FromPath); | ||
|
|
||
| if (string.IsNullOrEmpty(Severity) && !string.IsNullOrEmpty(defaultSeverity)) |
Collaborator
Author
There was a problem hiding this comment.
If a default severity is defined, here is where it's applied.
ericsciple
commented
Nov 21, 2019
TingluoHuang
approved these changes
Nov 21, 2019
thboop
reviewed
Nov 21, 2019
thboop
reviewed
Nov 21, 2019
thboop
approved these changes
Nov 21, 2019
Collaborator
thboop
left a comment
There was a problem hiding this comment.
Clean 🥇 , minor thoughts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem matchers are unable to interpret severity strings other than
warninganderror. Theseveritymatch group expectswarningorerror(case insensitive).However some tools indicate warning or error using codes such as W123 or E456.
To support non-standard severity strings, a problem matcher may now define a default severity (e.g. warning instead of error). This enables non-standard severity strings, by registering two problems matchers (one for warning, one for error).