Restores Markdown formatting for #19: make fmt and make fmt-check run prettier over every Markdown file next to gofmt, and CI checks it.
.prettierrc, .prettierignore, package.json and yarn.lock are copied from the prompts repo; yarn.lock pins prettier by hash.
prettier is never installed on a host. A new prettier stage in the Dockerfile installs it into a digest-pinned node image. Both scripts build that stage, tagged sfdupes-prettier, and docker run it with the repository mounted (read-only for the check), so they need docker and a local daemon.
CI runs the check in a new markdown stage that the build stage waits on. Because make fmt-check now needs docker, the lint stage runs gofmt directly, and the build stage's make fmt-check step is gone (it repeated the lint stage's gofmt check).
Most of the diff is README.md and TODO.md rewrapped by make fmt; the only hand edits there are the entries for the changed scripts and the new TODO.md line.
Deviation: item 3 of the issue asked script/bootstrap to install prettier; per the plan comment it runs in Docker, and bootstrap only warns when docker is missing.
Judgement call: the node image and the prettier install are written once, as a Dockerfile stage the scripts build, not pinned again in each script. No other of sneak's Go repos runs prettier with docker run; template-app-go copies formatted files out of a docker build instead.
Judgement call: the build times the plan asked for went to the repo manager, since timings are not posted on the tracker.
Model: opus-5-5
Restores Markdown formatting for https://git.eeqj.de/sneak/sfdupes/issues/19: `make fmt` and `make fmt-check` run prettier over every Markdown file next to gofmt, and CI checks it.
- `.prettierrc`, `.prettierignore`, `package.json` and `yarn.lock` are copied from the `prompts` repo; `yarn.lock` pins prettier by hash.
- prettier is never installed on a host. A new `prettier` stage in the `Dockerfile` installs it into a digest-pinned node image. Both scripts build that stage, tagged `sfdupes-prettier`, and `docker run` it with the repository mounted (read-only for the check), so they need docker and a local daemon.
- CI runs the check in a new `markdown` stage that the build stage waits on. Because `make fmt-check` now needs docker, the lint stage runs gofmt directly, and the build stage's `make fmt-check` step is gone (it repeated the lint stage's gofmt check).
Most of the diff is `README.md` and `TODO.md` rewrapped by `make fmt`; the only hand edits there are the entries for the changed scripts and the new `TODO.md` line.
- Deviation: item 3 of the issue asked `script/bootstrap` to install prettier; per the plan comment it runs in Docker, and bootstrap only warns when docker is missing.
- Judgement call: the node image and the prettier install are written once, as a `Dockerfile` stage the scripts build, not pinned again in each script. No other of sneak's Go repos runs prettier with `docker run`; `template-app-go` copies formatted files out of a `docker build` instead.
- Judgement call: the build times the plan asked for went to the repo manager, since timings are not posted on the tracker.
Model: opus-5-5
Dockerfile, the gofmt step in the lint stage (lines 33-35): the step ignores gofmt's own exit status, so a Go file that gofmt cannot parse passes it. Lint and tests skip files built only for another platform, so a syntax error in scan_dev_darwin.go now passes script/cibuild; on next the lint stage's make fmt-check failed the build, and script/fmt-check on this branch still fails it. Acceptable: the step fails whenever gofmt fails, as script/fmt-check does, for example by assigning gofmt's output to a variable first (which keeps its exit status) and then testing that the variable is empty.
TODO.md: the branch no longer rebases cleanly onto next; its Completed Steps entry conflicts with the one for #33. Acceptable: rebased onto current next, with this PR's entry on top.
Model: opus-5-5
1. `Dockerfile`, the gofmt step in the lint stage (lines 33-35): the step ignores gofmt's own exit status, so a Go file that gofmt cannot parse passes it. Lint and tests skip files built only for another platform, so a syntax error in `scan_dev_darwin.go` now passes `script/cibuild`; on `next` the lint stage's `make fmt-check` failed the build, and `script/fmt-check` on this branch still fails it. Acceptable: the step fails whenever gofmt fails, as `script/fmt-check` does, for example by assigning gofmt's output to a variable first (which keeps its exit status) and then testing that the variable is empty.
2. `TODO.md`: the branch no longer rebases cleanly onto `next`; its Completed Steps entry conflicts with the one for https://git.eeqj.de/sneak/sfdupes/issues/33. Acceptable: rebased onto current `next`, with this PR's entry on top.
Model: opus-5-5
The Dockerfile gofmt step now assigns gofmt's output to a variable first and fails on gofmt's own exit status, so a Go file gofmt cannot parse fails the step. I put a syntax error in scan_dev_darwin.go locally, script/cibuild failed at that step, and I restored the file.
Rebased onto current next with this PR's TODO.md entry on top. I re-ran make fmt after the rebase, which rewrapped the Markdown that landed on next in the meantime.
Model: opus-5-5
1. The `Dockerfile` gofmt step now assigns gofmt's output to a variable first and fails on gofmt's own exit status, so a Go file gofmt cannot parse fails the step. I put a syntax error in `scan_dev_darwin.go` locally, `script/cibuild` failed at that step, and I restored the file.
2. Rebased onto current `next` with this PR's `TODO.md` entry on top. I re-ran `make fmt` after the rebase, which rewrapped the Markdown that landed on `next` in the meantime.
Model: opus-5-5
script/fmt-check line 15, against its header comment (lines 3-5) and the script/fmt-check entry in README.md (line 779): both say gofmt and prettier run every time and each names itself when it fails. When gofmt cannot parse a Go file, set -e ends the script on line 15, so prettier never runs, unformatted Markdown goes unreported, and the error has no gofmt: label. Acceptable: the script records gofmt's own failure and still runs prettier (for example if ! files="$(gofmt -s -l .)"; then status=1; fi before the empty-output test), or the README and the comment say that a Go file gofmt cannot parse stops the check before prettier runs.
The branch no longer rebases onto current next: README.md and TODO.md conflict with the database path change for #55. Acceptable: rebased onto current next, with make fmt run again so the new README text is wrapped, and this PR's TODO.md entry on top.
Model: opus-5-5
1. `script/fmt-check` line 15, against its header comment (lines 3-5) and the `script/fmt-check` entry in `README.md` (line 779): both say gofmt and prettier run every time and each names itself when it fails. When gofmt cannot parse a Go file, `set -e` ends the script on line 15, so prettier never runs, unformatted Markdown goes unreported, and the error has no `gofmt:` label. Acceptable: the script records gofmt's own failure and still runs prettier (for example `if ! files="$(gofmt -s -l .)"; then status=1; fi` before the empty-output test), or the README and the comment say that a Go file gofmt cannot parse stops the check before prettier runs.
2. The branch no longer rebases onto current `next`: `README.md` and `TODO.md` conflict with the database path change for https://git.eeqj.de/sneak/sfdupes/issues/55. Acceptable: rebased onto current `next`, with `make fmt` run again so the new README text is wrapped, and this PR's `TODO.md` entry on top.
Model: opus-5-5
script/fmt-check now records gofmt's own failure (if ! files="$(gofmt -s -l .)"), prints gofmt: failed, and still runs prettier, as its header comment and README.md say. Tried locally with a Go file gofmt cannot parse and an unformatted Markdown file: one run reported both.
Rebased onto current next and re-ran make fmt, so the Markdown that landed meanwhile is wrapped; this PR's TODO.md entry is on top.
Model: opus-5-5
1. `script/fmt-check` now records gofmt's own failure (`if ! files="$(gofmt -s -l .)"`), prints `gofmt: failed`, and still runs prettier, as its header comment and `README.md` say. Tried locally with a Go file gofmt cannot parse and an unformatted Markdown file: one run reported both.
2. Rebased onto current `next` and re-ran `make fmt`, so the Markdown that landed meanwhile is wrapped; this PR's `TODO.md` entry is on top.
Model: opus-5-5
script/fmt and script/fmt-check run prettier over every Markdown file
again, next to gofmt. prettier is pinned by hash through package.json
and yarn.lock, copied from the prompts repo with .prettierrc and
.prettierignore, and is never installed on a host: a new prettier stage
of the Dockerfile installs it into a digest-pinned node image, and both
scripts build that stage and run it with the repository mounted. CI
checks the Markdown in a markdown stage that the build stage waits on.
Because make fmt-check now runs docker, the Dockerfile runs gofmt
directly in its lint stage instead. All Markdown is reformatted.
Model: opus-5-5
README.md: the script/lint entry under Entrypoints, changed on next for #48. Kept this PR's version of the list and added that change's new sentence (--output=type=cacheonly, no image written), then re-ran make fmt to rewrap it.
TODO.md: the Completed Steps entries for #48 and #16. This PR's entry stays on top, those two follow it, and make fmt rewrapped them.
Nothing else changed.
Model: opus-5-5
Rebased onto current `next`; two files conflicted.
- `README.md`: the `script/lint` entry under Entrypoints, changed on `next` for https://git.eeqj.de/sneak/sfdupes/issues/48. Kept this PR's version of the list and added that change's new sentence (`--output=type=cacheonly`, no image written), then re-ran `make fmt` to rewrap it.
- `TODO.md`: the Completed Steps entries for https://git.eeqj.de/sneak/sfdupes/issues/48 and https://git.eeqj.de/sneak/sfdupes/issues/16. This PR's entry stays on top, those two follow it, and `make fmt` rewrapped them.
Nothing else changed.
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.
Restores Markdown formatting for #19:
make fmtandmake fmt-checkrun prettier over every Markdown file next to gofmt, and CI checks it..prettierrc,.prettierignore,package.jsonandyarn.lockare copied from thepromptsrepo;yarn.lockpins prettier by hash.prettierstage in theDockerfileinstalls it into a digest-pinned node image. Both scripts build that stage, taggedsfdupes-prettier, anddocker runit with the repository mounted (read-only for the check), so they need docker and a local daemon.markdownstage that the build stage waits on. Becausemake fmt-checknow needs docker, the lint stage runs gofmt directly, and the build stage'smake fmt-checkstep is gone (it repeated the lint stage's gofmt check).Most of the diff is
README.mdandTODO.mdrewrapped bymake fmt; the only hand edits there are the entries for the changed scripts and the newTODO.mdline.script/bootstrapto install prettier; per the plan comment it runs in Docker, and bootstrap only warns when docker is missing.Dockerfilestage the scripts build, not pinned again in each script. No other of sneak's Go repos runs prettier withdocker run;template-app-gocopies formatted files out of adocker buildinstead.Model: opus-5-5
Dockerfile, the gofmt step in the lint stage (lines 33-35): the step ignores gofmt's own exit status, so a Go file that gofmt cannot parse passes it. Lint and tests skip files built only for another platform, so a syntax error inscan_dev_darwin.gonow passesscript/cibuild; onnextthe lint stage'smake fmt-checkfailed the build, andscript/fmt-checkon this branch still fails it. Acceptable: the step fails whenever gofmt fails, asscript/fmt-checkdoes, for example by assigning gofmt's output to a variable first (which keeps its exit status) and then testing that the variable is empty.TODO.md: the branch no longer rebases cleanly ontonext; its Completed Steps entry conflicts with the one for #33. Acceptable: rebased onto currentnext, with this PR's entry on top.Model: opus-5-5
a1a3385788toc78c5eca02c78c5eca02to56fd779f7aDockerfilegofmt step now assigns gofmt's output to a variable first and fails on gofmt's own exit status, so a Go file gofmt cannot parse fails the step. I put a syntax error inscan_dev_darwin.golocally,script/cibuildfailed at that step, and I restored the file.nextwith this PR'sTODO.mdentry on top. I re-ranmake fmtafter the rebase, which rewrapped the Markdown that landed onnextin the meantime.Model: opus-5-5
script/fmt-checkline 15, against its header comment (lines 3-5) and thescript/fmt-checkentry inREADME.md(line 779): both say gofmt and prettier run every time and each names itself when it fails. When gofmt cannot parse a Go file,set -eends the script on line 15, so prettier never runs, unformatted Markdown goes unreported, and the error has nogofmt:label. Acceptable: the script records gofmt's own failure and still runs prettier (for exampleif ! files="$(gofmt -s -l .)"; then status=1; fibefore the empty-output test), or the README and the comment say that a Go file gofmt cannot parse stops the check before prettier runs.The branch no longer rebases onto current
next:README.mdandTODO.mdconflict with the database path change for #55. Acceptable: rebased onto currentnext, withmake fmtrun again so the new README text is wrapped, and this PR'sTODO.mdentry on top.Model: opus-5-5
56fd779f7ato32d8252e50script/fmt-checknow records gofmt's own failure (if ! files="$(gofmt -s -l .)"), printsgofmt: failed, and still runs prettier, as its header comment andREADME.mdsay. Tried locally with a Go file gofmt cannot parse and an unformatted Markdown file: one run reported both.nextand re-ranmake fmt, so the Markdown that landed meanwhile is wrapped; this PR'sTODO.mdentry is on top.Model: opus-5-5
Review passed.
Model: opus-5-5
32d8252e50to1cdb491a76Rebased onto current
next; two files conflicted.README.md: thescript/lintentry under Entrypoints, changed onnextfor #48. Kept this PR's version of the list and added that change's new sentence (--output=type=cacheonly, no image written), then re-ranmake fmtto rewrap it.TODO.md: the Completed Steps entries for #48 and #16. This PR's entry stays on top, those two follow it, andmake fmtrewrapped them.Nothing else changed.
Model: opus-5-5