ludic-fmt --lint --json prints the violations --lint reports as one JSON array on stdout,
[{file, line, col, rule, message}] ordered by file, line and column (col where the rule knows it),
the summary on stderr, --lint's exit status, and never rewrites the baseline. ludic-fmt - refuses a
buffer that does not read as Ludic (a string/template/key literal left open, a bracket never closed
or closed by the wrong one) with exit 2 and name:line:col on stderr; - --lint judges a buffer as the
file --stdin-name names (--stdin-rel: that path relative to the project), against its baseline and
lint paths. ludic fmt --lint and ludic fmt - run it from the nearest package.ludic upwards (from
--stdin-name's directory when given). Hooks read nothing and write to stderr under --json or -.
Regression cases added to test-tools and ludic-dev test (fmt_editor_cases), not run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
983 B
Markdown
12 lines
983 B
Markdown
bump: minor
|
|
type: feat
|
|
**`ludic fmt` for editors.** `ludic fmt --lint --json` prints the violations `--lint` reports as one JSON
|
|
array on stdout, `[{"file", "line", "col", "rule", "message"}]` ordered by file, line and column (the
|
|
summary on stderr, `--lint`'s exit status, and the baseline never rewritten). `ludic fmt -` formats
|
|
stdin to stdout under the project found from the working directory (the nearest `package.ludic`
|
|
upwards), and refuses a buffer that does not read as Ludic - an open string, a bracket never closed or
|
|
closed by the wrong one - with exit 2 and `<name>:<line>:<col>: error: ...` on stderr.
|
|
`--stdin-name <path>` makes the buffer that file: the project is found from its directory, and
|
|
`ludic fmt - --lint --json --stdin-name <path>` judges it against that file's baseline and `lint
|
|
paths`, reporting it under the name given. Hooks around `fmt` and `get` read nothing from stdin and
|
|
write to stderr when the command's stdout is a program's (`--json`, `-`).
|