-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
add ability to set issue severity #1155
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
add ability to set issue severity #1155
Conversation
…ed on severity rules
|
I have no objections, design looks good to me. |
|
One thought I had where this could get complicated is if multiple out formats are supported. It would be difficult to change this to accommodate multiple out formats, atleast not without breaking changes. |
|
cc: @jirfag We can avoid breaking changes via keeping default behavior, so format will change only with explicit configuration. So I'm pretty positive for this feature. |
|
@ernado sounds fair. I will add some tests to this PR |
…ix lint issues, better doc comments, share processor test
|
Tests have been added |
jirfag
left a comment
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.
awesome work!
code duplication confuses a bit
… rule types, moved severity config to it's own parent key named severity, reduced size of NewRunner function to make it easier to read
…mate reporter easier to read, checkstyle output is now pretty printed
|
@jirfag thanks for the review. Updated based on feedback and added more detail to the PR description |
jirfag
left a comment
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.
fantastic!
|
hi, any plans for releasing this? |
User facing changes:
severityconfig to allow for custom issue severity for out formats that support it based on severity rules. Case sensitive severity rules are supported as wellseveritysupport tocheckstyle,code-climateandgithubout formatscheckstyleout format so humans can read it as wellInternal changes:
Issuestruct namedSeverity. This allows setting severity for issuesIssuestruct namedDescription. This allows reusing logic to create a issue description for printers. It's a combination of linter name and issue textIssuestruct namedFingerprint. This allows reusing logic to create a issue md5 hash for printers. The fingerprint is made up of issue filename, text and if available the first line in the fileBaseRulestruct has been added that allows us to extend the rule code beyond just using it forExcludeRulesBaseRulemethods have 100% test coverageNewRunnermethod easier to read by moving some logic out of it for creating new processorscodeclimatecode easier to read