script/fmt writes with gofmt -s and goimports, but script/fmt-check only ran gofmt -l. A file that gofmt -s would simplify, or whose imports goimports would regroup, passed make check and then changed the next time someone ran make fmt. This fixes #22.
script/fmt-check now runs gofmt -s -l . and goimports -l ., prints the files either would change, and exits non-zero. It writes nothing. Like script/fmt, it puts Go's bin directory on PATH first, so it runs the goimports that script/bootstrap installs. Most formatting slips are reported by both tools, so the list goes through sort -u to print each file once.
make fmt-check (and so make check) now needs goimports on the host, as make fmt already did. make bootstrap installs it, and script/cibuild runs that first.
Judgement call: the README line saying make check checks formatting "with gofmt" now names both formatters. The issue did not ask for that, but the line described the old check.
Model: opus-5-5
`script/fmt` writes with `gofmt -s` and goimports, but `script/fmt-check` only ran `gofmt -l`. A file that `gofmt -s` would simplify, or whose imports goimports would regroup, passed `make check` and then changed the next time someone ran `make fmt`. This fixes https://git.eeqj.de/sneak/attrsum/issues/22.
`script/fmt-check` now runs `gofmt -s -l .` and `goimports -l .`, prints the files either would change, and exits non-zero. It writes nothing. Like `script/fmt`, it puts Go's bin directory on `PATH` first, so it runs the goimports that `script/bootstrap` installs. Most formatting slips are reported by both tools, so the list goes through `sort -u` to print each file once.
`make fmt-check` (and so `make check`) now needs goimports on the host, as `make fmt` already did. `make bootstrap` installs it, and `script/cibuild` runs that first.
Judgement call: the README line saying `make check` checks formatting "with `gofmt`" now names both formatters. The issue did not ask for that, but the line described the old check.
Model: opus-5-5
script/fmt writes with gofmt -s and goimports, but script/fmt-check
only ran gofmt -l. A file that gofmt -s would simplify, or whose
imports goimports would regroup, passed make check and then changed
on the next make fmt.
script/fmt-check now runs gofmt -s -l and goimports -l, prints each
file either would change once, and fails. It puts Go's bin directory
on PATH first, as script/fmt does, so it runs the goimports that
script/bootstrap installs. The README line on what make check runs
now names both formatters.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
script/fmtwrites withgofmt -sand goimports, butscript/fmt-checkonly rangofmt -l. A file thatgofmt -swould simplify, or whose imports goimports would regroup, passedmake checkand then changed the next time someone ranmake fmt. This fixes #22.script/fmt-checknow runsgofmt -s -l .andgoimports -l ., prints the files either would change, and exits non-zero. It writes nothing. Likescript/fmt, it puts Go's bin directory onPATHfirst, so it runs the goimports thatscript/bootstrapinstalls. Most formatting slips are reported by both tools, so the list goes throughsort -uto print each file once.make fmt-check(and somake check) now needs goimports on the host, asmake fmtalready did.make bootstrapinstalls it, andscript/cibuildruns that first.Judgement call: the README line saying
make checkchecks formatting "withgofmt" now names both formatters. The issue did not ask for that, but the line described the old check.Model: opus-5-5
Review passed.
Model: opus-5-5