Add verbosity levels for warnings and errors#3371
Conversation
These behave the same as normal in terms of output formatting, but have a minimum log level of warning and error respectively. This is useful when formatting to stdout with e.g. --out /dev/fd/1 to avoid the "<file> was formatted." message appearing in the output.
|
Hey Simon, thanks for the PR! Before we go the Formatting only needs the untyped tree, so it should never get stuck waiting on type-checking. If it does, that smells like something on the editor/LSP side rather than something |
|
Hi Florian, Thanks for looking at this. Sorry, I meant to add a comment here to say I'd solved my particular problem using apheleia, which is happy with this. I previously overlooked using So I have no need for this personally. Merge it if you think it's useful, otherwise no problem! Cheers, |
These behave the same as normal in terms of output formatting, but have a minimum log level of warning and error respectively.
This is useful when formatting to stdout with e.g.
--out /dev/fd/1to avoid the"<file> was formatted."message appearing in the formatted output.
(Being able to format to stdout seems to be essential for e.g. hooking Fantomas into Emacs Aphelia.)
Relates to #2665