Check Go formatting with gofumpt, as make fmt writes it (closes #70)
check / check (push) Failing after 2s
check / check (push) Failing after 2s
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
This commit was merged in pull request #149.
This commit is contained in:
+3
-2
@@ -7,8 +7,9 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
gofumpt -l -w mfer internal cmd
|
||||
# Markdown and JSON, over the same file set script/fmt-check verifies.
|
||||
# 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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user