Check Go formatting with gofumpt, as make fmt writes it (closes #70)
check / check (push) Failing after 3s
check / check (push) Failing after 3s
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 is contained in:
@@ -91,16 +91,19 @@ provide:
|
||||
- `script/lint` — run `golangci-lint` in Docker: builds only the `lint` stage of
|
||||
the `Dockerfile` (the Go format check, then the linter), uncached so it runs
|
||||
every time, then removes the image
|
||||
- `script/fmt` — format all code and docs (writes): `gofumpt` and
|
||||
- `script/fmt` — format all code and docs (writes): `script/gofumpt --write` and
|
||||
`script/prettier --write`
|
||||
- `script/gofumpt` — run `gofumpt` over every Go file in the repository in the
|
||||
given mode, `--write` or `--check`, at the one version it pins (built on
|
||||
demand by `go run`, so nothing installs it); `script/fmt`, `script/fmt-check`
|
||||
and the Docker lint stage (`make fmt-check-go`) all go through it, so they
|
||||
cannot disagree about Go formatting
|
||||
- `script/prettier` — run prettier over the repository's canonical file set
|
||||
(Markdown and JSON, minus `.prettierignore`) in the given mode, `--write` or
|
||||
`--check`; the single definition of that file set, so `script/fmt` and
|
||||
`script/fmt-check` cannot disagree about it
|
||||
- `script/fmt-check` — check formatting without writing: `script/fmt-check-go`
|
||||
plus `script/prettier --check`
|
||||
- `script/fmt-check-go` — the Go half of `script/fmt-check`, on its own, for the
|
||||
Docker lint stage, whose image has no node
|
||||
- `script/fmt-check` — check formatting without writing:
|
||||
`script/gofumpt --check` plus `script/prettier --check`
|
||||
- `script/check` — run `script/test`, `script/lint`, and `script/fmt-check`
|
||||
- `script/docker` — build the Docker image tagged with the project name
|
||||
- `script/cibuild` — CI entrypoint: builds the image with the same command as
|
||||
|
||||
Reference in New Issue
Block a user