-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Support multiple formatters #538
Conversation
Fixes jeremyjh#530 One scenario where multiple formatters is helpful is on CI where you want to use the GitHub formatter along with a more verbose formatter to see more about the specific failures (especially when viewing the CI logs directly).
08ef5cf
to
c329c1b
Compare
@jeremyjh Ping! Do you have any thoughts on this PR? |
lib/dialyxir/dialyzer.ex
Outdated
defp parse_formatter("short"), do: Dialyxir.Formatter.Short | ||
|
||
defp parse_formatter(unknown) do | ||
Logger.warning("Unrecognized formatter #{unknown} received. Falling back to default.") |
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.
I don't have an issue with depending on :logger
, but we already use the Mix.shell functions for text output (through Dialyxir.Output module) and Output.warning should color the text - is there a particular reason to use Logger instead ?
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.
Okay, updated to use Dialyxir.Output.warning
in baaa24d
@axelson Sorry, was just very busy and then forgot to get back to this. I really appreciate the contribution! Would you mind adding an update to the docs for this? |
No worries! I've definitely taken significantly longer to respond to PRs 😅 Yeah I'll take a first crack at adding docs for this 👍 |
Okay I've added docs in baaa24d Also let me know if you want me to clean up the git history |
@axelson Thanks! |
Thank you! ❤️ |
Fixes #530
One scenario where multiple formatters is helpful is on CI where you want to use the GitHub formatter along with a more verbose formatter to see more about the specific failures (especially when viewing the CI logs directly).
I add
:logger
to give the user a warning message if they provide an invalid name for a formatter but I can remove the warning if there's a specific reason to not depend on logger.Example run:
Updated docs in README: