Skip to content

Fix issue #17: Dynamic color mapping for "fail-on" messages/categories in ColorizedTextReporter #18

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snipr-ben
Copy link

This pull request fixes #17.

The PR has successfully addressed the issue by implementing dynamic message coloring for custom fail-on configurations. The key changes include:

  1. Added a new fail_on_symbols list to store custom fail-on configurations
  2. Modified the _get_decoration method to check if a message is in fail_on_symbols and apply special styling (red, bold, inverse) if found
  3. Added logic to update fail_on_symbols when the module changes via on_set_current_module

These changes allow the colorizer to:

  • Detect custom fail-on configurations dynamically
  • Apply distinct styling (red, bold, inverse) to messages that should trigger failures
  • Maintain the existing behavior for standard messages

The implementation provides the requested functionality without requiring external verification, as the core logic for dynamic styling is now properly implemented in the text reporter. The test files included in the PR demonstrate the system can handle various module configurations while maintaining the new coloring behavior.

Copy link

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit d03ac55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic color mapping for "fail-on" messages/categories in ColorizedTextReporter
1 participant