feat: exclude linters from severity-rules #4434
Closed
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.
Currently when configuring severity-rules we lose the granularity provided by more advanced linters.
A good use case is revive that allows us to customize the severity per linter. Considering the configuration below all the revive issues will have
info
severity instead of the severity defined in revive.I already brought this to discussion in the past, #1860, and I accepted the limitation. But now I'm trying to work on a more precise coding standard for my teams and having the ability to control this would be perfect.
Output before the proposal
With this proposal we add an
exclude-linters
to skip thedefault-severity
Output after the proposal
I didn't write any tests for this yet, I simply tested it locally to validate the output files.
Let me know if this is something worth to put more effort and I will happily finalize the work.