check / check (push) Waiting to run
The Go format check ran plain gofmt, which accepts code that gofumpt, the formatter script/fmt runs, rewrites; and the two covered different files. Both now go through script/gofumpt, which runs one pinned gofumpt version over every Go file in --write or --check mode, as script/prettier does for Markdown. It replaces script/fmt-check-go; make fmt-check-go and the Docker lint stage call it. go run builds the pinned version, so nothing has to install gofumpt, and the check fails when gofumpt cannot run instead of passing. Generated mfer/mf.pb.go passes: gofumpt holds generated files to gofmt's rules. The check is not redundant: .golangci.yml enables no golangci-lint formatters. Model: opus-5-5
17 lines
397 B
Bash
Executable File
17 lines
397 B
Bash
Executable File
#!/bin/sh
|
|
# script/fmt: format all files (writes).
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
# Go, then Markdown and JSON, through the same scripts script/fmt-check
|
|
# uses, so both see the same files and the same tool versions.
|
|
"$SCRIPT_DIR/gofumpt" --write
|
|
"$SCRIPT_DIR/prettier" --write
|
|
}
|
|
|
|
main "$@"
|