Closed cyntheticfox closed 2 years ago
I've seen this done either as the default, or with a specific --stdin flag.
Understood. I did feel like a "streaming" option for all interactions was long overdue. I'll work on this over the weekend.
The latest release (v0.4.0
) contains a -s, --stdin
flag for statix check
, statix fix
and statix single
. Every subcommand with the flag will accept exactly one file on stdin
and output diagnostics on stdout
.
The other flags will function as expected, for example, statix check -o errfmt -s
will accept a file on stdin
and output errorformat compatible output on stdout
.
Feel free to reopen if something is not functioning as expected :)
A lot of linting engines are designed to run with
stdin
so as to allow for checking buffers instead of only saved files. I've seen this done either as the default, or with a specific--stdin
flag. Support for bothcheck
andfix
would be great.Specifically requesting this since it might be necessary for #10.