deno icon indicating copy to clipboard operation
deno copied to clipboard

`deno fmt --quiet --check` does not exit on first difference found & does not have a `--fail-fast` option

Open comods opened this issue 4 months ago • 0 comments

Version: Deno 2.0.3

deno fmt

  • updates files.

deno fmt --check

  • if 0 issues:
    • prints all needed updates.
    • returns 0.
  • if 1 or more needed updates:
    • prints: error: Found 1 not formatted file in 1 file.
    • returns 1.

deno fmt --quiet --check

  • if 0 issues:
    • returns 0.
  • if 1 or more needed updates:
    • prints: error: Found 1 not formatted file in 1 file.
    • returns 1.

Could a --fail-fast please be added that short-circuits. As soon as it knows it is going to exit with a 1, it should instantly exit. deno fmt --quiet --check --fail-fast

  • if 0 issues:
    • returns 0.
  • on first found needed update:
    • returns 1.

comods avatar Oct 27 '24 16:10 comods