How do I configure null-ls.nvim to ignore a formatter's output if it returns an error exit code? #1492
-
I have a formating utility that prints an error message to stdout even when it fails and exits with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can use If this is for a null-ls built-in source, I'd also consider putting in a PR so other users can benefit from the exit code fix. |
Beta Was this translation helpful? Give feedback.
Given the following null-ls source:
And the following script in
bad_formatter.sh
:null-ls will correctly handle this case, as well as the more common
stderr
case:If your formatter outputs to both
stdout
andstderr
, that is indeed an edge case:But …