Skip to content

Conversation

@jeltz
Copy link
Contributor

@jeltz jeltz commented Jan 14, 2026

This PR tries to clean up the test helpers and especially simplify the code and improve the readability of the Loggable module. There were a lot of dead code paths in that module and unnecessarily complicated logic. It can be further simplified but I think this is good enough for now.

Changes:

  • Minor white space fixes
  • Remove some commented out code
  • Simplify the output colorization helpers
  • Simplify the logging test helpers (trace and message)
  • Simplify the run and log_and_run test helpers

jeltz added 5 commits January 15, 2026 00:03
These extra empty lines are pretty arbitrarily inserted and makes the
readability worse so be consistent about the code style.
This commented out code seems like it was left here by accident and that
it does not provide any value for future readers.
The code for colorizing text was unnecessarily complex for the few
callers it had. It can be simplified even further, e.g. by dropping
support for having multiple attributes, but that is left for fututre
cleanups.
By making sure we always call the logging test helpers with a single
string we can simplify the code for them. The only callers with a list
were Loggable#run and Loggable#log_and_run.
Flattening the input is not necessarily since no caller calls us with
anything which needs to be flattened.
@larskanis larskanis merged commit 6634a67 into ged:master Jan 15, 2026
35 of 36 checks passed
@larskanis
Copy link
Collaborator

Looks all good. Thank you!

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.

2 participants