fmt: format and check Markdown with prettier in a container (closes #119) #196

Merged
clawbot merged 1 commits from issue-119-markdown-fmt into next 2026-10-02 00:19:30 +02:00
Collaborator

The Markdown half of #119, copied from template-app-go.

  • prettier 3.9.6 is pinned by package.json and yarn.lock; .prettierrc sets 4-space tabs and proseWrap: always.
  • Dockerfile.fmt installs it on a digest-pinned node image. script/fmt takes the formatted Markdown back out of a docker build --output; script/fmt-check-markdown runs prettier --check, forced to execute every time.
  • script/fmt-check runs script/fmt-check-go (its old body) and then script/fmt-check-markdown. The Dockerfile lint stage cannot run docker, so it runs the Go half only, and script/cibuild runs the Markdown half after the build.
  • *.md is no longer in .dockerignore.

Most of the diff is mechanical: make fmt reformatted README.md, TESTING.md and TODO.md (REPO_POLICIES.md was already clean). The only wording changes are the README Entrypoints entries, the README Building line for make fmt ("Format code and Markdown (requires docker)"), and the TODO.md entry.

Not visible in the diff: make fmt and make fmt-check now need docker, and make docker checks only the Go formatting.

Where this differs from the template:

  • golangci-lint stays in Dockerfile.lint, so prettier gets its own Dockerfile.fmt instead of sharing the template's Dockerfile.check.
  • yarn.lock and the yarn in the pinned node image, not package-lock.json and npm, because REPO_POLICIES.md says to use yarn.
  • The check is forced to run with --no-cache-filter, as script/lint does here, not with the template's GATE_RUN build argument.

Disclosures:

  • Judgement call: .prettierignore lists static/css/tailwind.min.css, as the issue asks, although prettier is only given *.md files.

Model: opus-5-5

The Markdown half of https://git.eeqj.de/sneak/dnswatcher/issues/119, copied from `template-app-go`. - prettier 3.9.6 is pinned by `package.json` and `yarn.lock`; `.prettierrc` sets 4-space tabs and `proseWrap: always`. - `Dockerfile.fmt` installs it on a digest-pinned node image. `script/fmt` takes the formatted Markdown back out of a `docker build --output`; `script/fmt-check-markdown` runs `prettier --check`, forced to execute every time. - `script/fmt-check` runs `script/fmt-check-go` (its old body) and then `script/fmt-check-markdown`. The `Dockerfile` lint stage cannot run docker, so it runs the Go half only, and `script/cibuild` runs the Markdown half after the build. - `*.md` is no longer in `.dockerignore`. Most of the diff is mechanical: `make fmt` reformatted `README.md`, `TESTING.md` and `TODO.md` (`REPO_POLICIES.md` was already clean). The only wording changes are the README Entrypoints entries, the README Building line for `make fmt` ("Format code and Markdown (requires docker)"), and the `TODO.md` entry. Not visible in the diff: `make fmt` and `make fmt-check` now need docker, and `make docker` checks only the Go formatting. Where this differs from the template: - golangci-lint stays in `Dockerfile.lint`, so prettier gets its own `Dockerfile.fmt` instead of sharing the template's `Dockerfile.check`. - `yarn.lock` and the yarn in the pinned node image, not `package-lock.json` and npm, because `REPO_POLICIES.md` says to use yarn. - The check is forced to run with `--no-cache-filter`, as `script/lint` does here, not with the template's `GATE_RUN` build argument. Disclosures: - Judgement call: `.prettierignore` lists `static/css/tailwind.min.css`, as the issue asks, although prettier is only given `*.md` files. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 00:08:19 +02:00
clawbot self-assigned this 2026-10-02 00:08:19 +02:00
clawbot added 1 commit 2026-10-02 00:08:20 +02:00
make fmt and make fmt-check now cover every Markdown file with prettier
(4-space tabs, proseWrap always), as template-app-go does: prettier is
pinned by package.json and yarn.lock and runs in a docker build on a
digest-pinned node image, never on the host. The check is forced to run
with --no-cache-filter, as script/lint is.

script/fmt-check is split into a Go half and a Markdown half because the
Dockerfile lint stage cannot run docker: that stage now runs the Go half
and script/cibuild runs the Markdown half after the build. *.md leaves
.dockerignore so documents reach the build context.

README.md, TESTING.md and TODO.md are reformatted by make fmt; apart from
the Entrypoints and TODO entries, that diff is mechanical.

Model: opus-5-5
Author
Collaborator
  • The PR body says the only wording changes in the reformatted documents are the README Entrypoints entries and the TODO.md entry, and the commit message says the same. But the make fmt line in the README "Building" section was also reworded: "Format code" became "Format code and Markdown (requires docker)". To fix: name that change in both the PR body and the commit message, so both match the diff.

Model: opus-5-5

- The PR body says the only wording changes in the reformatted documents are the README Entrypoints entries and the `TODO.md` entry, and the commit message says the same. But the `make fmt` line in the README "Building" section was also reworded: "Format code" became "Format code and Markdown (requires docker)". To fix: name that change in both the PR body and the commit message, so both match the diff. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-02 00:18:53 +02:00
Author
Collaborator

Finding in #196 (comment): the PR body now names the README Building line for make fmt, and the landing commit message names it too. Text only; no code changed.

Model: opus-5-5

Finding in https://git.eeqj.de/sneak/dnswatcher/pulls/196#issuecomment-109504: the PR body now names the README Building line for `make fmt`, and the landing commit message names it too. Text only; no code changed. Model: opus-5-5
clawbot merged commit 4c2932d6d6 into next 2026-10-02 00:19:30 +02:00
clawbot deleted branch issue-119-markdown-fmt 2026-10-02 00:19:30 +02:00
clawbot removed the needs-rework label 2026-10-02 00:19:30 +02:00
Sign in to join this conversation.