forked from pylint-dev/pylint
-
Notifications
You must be signed in to change notification settings - Fork 0
Dynamic color mapping for "fail-on" messages/categories in ColorizedTextReporter #17
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
Comments
original issue number is 9898 |
@snipr-ben snipe it thank you |
Pull request created: #18 |
Pull request created: #19 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current problem
The ColorizedTextReporter (
--output-format=colorized
) makes it easy in CI jobs to find the failure causing pylint errors quickly.Especially when there are more than a few unfixed pylint findings.
But if the configuration for
fail-on
differs from the default value, e.g. additional message types have been added to fail-on, these are not highlighted in red and are therefore more difficult to find in the CI log.Desired solution
I suggest more dynamic message coloring for custom
fail-on
configs.For example if a whole category or single message type is configured as fail-on, then color it the same as Error or Failure message category. Or perhaps a completely new color (e.g. red inverse) that represents all fail-on messages/categories?
Additional context
My current workaround is a custom reporter class. But since the reporter class currently has no access to the linter variable
self.fail_on_symbols
, only hardcoded color codes for extra message types are possible.The text was updated successfully, but these errors were encountered: