efm-langserver icon indicating copy to clipboard operation
efm-langserver copied to clipboard

Ability to ignore the format command exit code

Open languitar opened this issue 4 years ago • 4 comments

ktlint for kotlin can do auto-formatting. But after formatting it always also performs linting. If errors remain after formatting, the exit code will be != 0. I would need an option to ignore this non-zero exit code for formatting to make ktlint formatting functional.

languitar avatar Nov 07 '21 14:11 languitar

I have the same case scenario with phpcbf, I used || true to ignore error code

format-command: './vendor/bin/phpcbf - || true'

22mahmoud avatar Jun 01 '24 21:06 22mahmoud

The efmls-configs for standard js has the same issue (js_standard.lua).

glitch-cake avatar Jun 10 '24 13:06 glitch-cake

There's a lint-ignore-exit-code configuration.

Implementing similar configuration for formatting seems straightforward.

sirreal avatar Nov 05 '24 15:11 sirreal

I created https://github.com/mattn/efm-langserver/pull/285 to address this.

sirreal avatar Nov 05 '24 16:11 sirreal