Make formatter output quiet on success (#29467)

## Why

`just fmt` is quite noisy even on successful runs.

## What

Only print output when a formatter fails.

- Buffer output from each formatter and print only a failed command and
its diagnostics.
- Prefix the `justfile` driver invocations with `@` so Just does not
echo the command itself.
- Retain rustfmt stderr on failure and cover silent-success and
failure-reporting behavior.

## Validation

- Confirmed `just fmt` and `just fmt-check` both exit successfully with
empty stdout and stderr.
This commit is contained in:
Adam Perry @ OpenAI
2026-06-22 17:55:49 -07:00
committed by GitHub
parent e65e480e0d
commit ff31ba8d0a
3 changed files with 85 additions and 30 deletions

View File

@@ -38,11 +38,11 @@ app-server-test-client *args:
# Format the justfile, Rust, Bazel/Starlark, Python SDK code, and Python scripts.
fmt:
{{ python }} ../scripts/format.py
@{{ python }} ../scripts/format.py
# Check formatting without modifying files.
fmt-check:
{{ python }} ../scripts/format.py --check
@{{ python }} ../scripts/format.py --check
fix *args:
cargo clippy --fix --tests --allow-dirty {args}