This repo's script/check runs only two, in a different order:
main(){"$SCRIPT_DIR/fmt-check""$SCRIPT_DIR/test"}
script/lint is never invoked. Because make check shims to script/check,
and the Dockerfile runs make check, and script/cibuild is just docker build ., the consequence is that script/lint runs nowhere in the entire
gate — not in make check, not in the pre-commit hook (script/precommit
calls script/check), and not in CI. The script exists and is documented in
the README but is dead code.
This is not cosmetic. script/lint runs hugo --minify --printPathWarnings,
which surfaces render-target collisions that plain hugo --minify does not.
That signal is currently discarded.
REPO_POLICIES.md also requires make check to run test, lint, and fmt-check: "make check (runs test, lint, fmt-check)".
Definition of done
script/check invokes script/test, script/lint, and script/fmt-check,
in that canonical order.
Running make check visibly executes the lint step (its --printPathWarnings output appears).
README.md's Entrypoints section is corrected — it currently says
"script/check — run script/fmt-check then script/test; modifies
nothing", which will no longer be true.
make check passes and script/cibuild succeeds with the lint step
included.
script/check still modifies no files (REPO_POLICIES.md: "make check
must not modify any files in the repo"). Note that script/test and script/lint both write to public/, which is gitignored and was already
the case before this change; verify git status is clean after make check.
TODO.md updated in the same commit.
Note on a warning this will surface
The Hugo build currently emits:
WARN found no layout file for "html" for kind "taxonomy": You should create a
template file which matches Hugo Layouts Lookup Rules for this combination.
It is a warning, not an error, so it will not fail the gate. Do not fix it in
this issue — it is tracked separately. Do not add --panicOnWarning or
otherwise escalate warnings to errors here either; that is a separate decision.
Ref: REPO_POLICIES.md — scripts-to-rule-them-all section; canonical script/check at https://git.eeqj.de/sneak/prompts/raw/branch/main/script/check.
## Problem
The canonical `script/check` runs three things, in this order:
```sh
main() {
"$SCRIPT_DIR/test"
"$SCRIPT_DIR/lint"
"$SCRIPT_DIR/fmt-check"
}
```
This repo's `script/check` runs only two, in a different order:
```sh
main() {
"$SCRIPT_DIR/fmt-check"
"$SCRIPT_DIR/test"
}
```
`script/lint` is never invoked. Because `make check` shims to `script/check`,
and the `Dockerfile` runs `make check`, and `script/cibuild` is just `docker
build .`, the consequence is that **`script/lint` runs nowhere in the entire
gate** — not in `make check`, not in the pre-commit hook (`script/precommit`
calls `script/check`), and not in CI. The script exists and is documented in
the README but is dead code.
This is not cosmetic. `script/lint` runs `hugo --minify --printPathWarnings`,
which surfaces render-target collisions that plain `hugo --minify` does not.
That signal is currently discarded.
`REPO_POLICIES.md` also requires `make check` to run `test`, `lint`, and
`fmt-check`: "`make check` (runs `test`, `lint`, `fmt-check`)".
## Definition of done
1. `script/check` invokes `script/test`, `script/lint`, and `script/fmt-check`,
in that canonical order.
2. Running `make check` visibly executes the lint step (its
`--printPathWarnings` output appears).
3. `README.md`'s Entrypoints section is corrected — it currently says
"`script/check` — run `script/fmt-check` then `script/test`; modifies
nothing", which will no longer be true.
4. `make check` passes and `script/cibuild` succeeds with the lint step
included.
5. `script/check` still modifies no files (`REPO_POLICIES.md`: "`make check`
must not modify any files in the repo"). Note that `script/test` and
`script/lint` both write to `public/`, which is gitignored and was already
the case before this change; verify `git status` is clean after `make
check`.
6. `TODO.md` updated in the same commit.
## Note on a warning this will surface
The Hugo build currently emits:
```
WARN found no layout file for "html" for kind "taxonomy": You should create a
template file which matches Hugo Layouts Lookup Rules for this combination.
```
It is a warning, not an error, so it will not fail the gate. **Do not fix it in
this issue** — it is tracked separately. Do not add `--panicOnWarning` or
otherwise escalate warnings to errors here either; that is a separate decision.
Ref: `REPO_POLICIES.md` — scripts-to-rule-them-all section; canonical
`script/check` at
`https://git.eeqj.de/sneak/prompts/raw/branch/main/script/check`.
Branch fix/check-runs-lint from main, in an isolated worktree.
script/check — change main() to invoke, in canonical order: "$SCRIPT_DIR/test", "$SCRIPT_DIR/lint", "$SCRIPT_DIR/fmt-check".
The file's own header comment currently says "Runs the read-only
formatting check first, then the clean production build", which
becomes false with this change, so it gets rewritten to describe the
three-step canonical order. No other change to the script; it stays set -eu with the same SCRIPT_DIR resolution.
README.md — correct the Entrypoints bullet from "script/check
— run script/fmt-check then script/test; modifies nothing" to
describe the actual order (script/test, script/lint, script/fmt-check), keeping the "modifies nothing" claim since it
remains true for tracked files. make fmt afterwards so prettier
(4-space tabs, proseWrap: always) reflows the list item.
TODO.md — add a dated entry at the top of Completed Steps for
this change, in the same commit as the work, per the Workflow block.
The Next Step item (policy scaffold: LICENSE, REPO_POLICIES.md, .editorconfig, prettier config) is a different task and is left
untouched.
Verification I will run
make check — must be green and must visibly show the lint step's --printPathWarnings output between the test build and the prettier
check.
git status --porcelain immediately after make check — must show
nothing beyond pre-existing untracked paths, confirming the gate still
modifies no tracked files (public/ is gitignored and was already
written by script/test before this change).
script/cibuild. Because the Dockerfile does COPY . . then RUN make check with no cache control, a green cibuild on an
unchanged tree can be served from the layer cache and prove nothing
(tracked as #23). I will therefore confirm the RUN make check layer
genuinely executed by checking the build output is not CACHED and
contains real Hugo and prettier output; if it is cache-served I will
force a real run with a stage-scoped --no-cache-filter build and say
so explicitly in the PR. I will not run any form of docker builder prune.
The PR body will state exactly what ran and whether the cibuild run was
genuinely executed or cache-served, with the lint step's actual output
pasted.
Out of scope, per the issue — will not be touched
The found no layout file for "html" for kind "taxonomy" Hugo warning
(#13). It is a warning, not an error, and will not fail the gate.
--panicOnWarning or any other escalation of warnings to errors.
The cibuild cache-invalidation defect itself (#23).
## Implementation plan
Branch `fix/check-runs-lint` from `main`, in an isolated worktree.
1. **`script/check`** — change `main()` to invoke, in canonical order:
`"$SCRIPT_DIR/test"`, `"$SCRIPT_DIR/lint"`, `"$SCRIPT_DIR/fmt-check"`.
The file's own header comment currently says "Runs the read-only
formatting check first, then the clean production build", which
becomes false with this change, so it gets rewritten to describe the
three-step canonical order. No other change to the script; it stays
`set -eu` with the same `SCRIPT_DIR` resolution.
2. **`README.md`** — correct the Entrypoints bullet from "`script/check`
— run `script/fmt-check` then `script/test`; modifies nothing" to
describe the actual order (`script/test`, `script/lint`,
`script/fmt-check`), keeping the "modifies nothing" claim since it
remains true for tracked files. `make fmt` afterwards so prettier
(4-space tabs, `proseWrap: always`) reflows the list item.
3. **`TODO.md`** — add a dated entry at the top of Completed Steps for
this change, in the same commit as the work, per the Workflow block.
The Next Step item (policy scaffold: `LICENSE`, `REPO_POLICIES.md`,
`.editorconfig`, prettier config) is a different task and is left
untouched.
### Verification I will run
- `make check` — must be green and must visibly show the lint step's
`--printPathWarnings` output between the test build and the prettier
check.
- `git status --porcelain` immediately after `make check` — must show
nothing beyond pre-existing untracked paths, confirming the gate still
modifies no tracked files (`public/` is gitignored and was already
written by `script/test` before this change).
- `script/cibuild`. Because the `Dockerfile` does `COPY . .` then
`RUN make check` with no cache control, a green cibuild on an
unchanged tree can be served from the layer cache and prove nothing
(tracked as #23). I will therefore confirm the `RUN make check` layer
genuinely executed by checking the build output is not `CACHED` and
contains real Hugo and prettier output; if it is cache-served I will
force a real run with a stage-scoped `--no-cache-filter` build and say
so explicitly in the PR. I will not run any form of
`docker builder prune`.
The PR body will state exactly what ran and whether the cibuild run was
genuinely executed or cache-served, with the lint step's actual output
pasted.
### Out of scope, per the issue — will not be touched
- The `found no layout file for "html" for kind "taxonomy"` Hugo warning
(#13). It is a warning, not an error, and will not fail the gate.
- `--panicOnWarning` or any other escalation of warnings to errors.
- Timeout guards (#16).
- The cibuild cache-invalidation defect itself (#23).
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.
Problem
The canonical
script/checkruns three things, in this order:This repo's
script/checkruns only two, in a different order:script/lintis never invoked. Becausemake checkshims toscript/check,and the
Dockerfilerunsmake check, andscript/cibuildis justdocker build ., the consequence is thatscript/lintruns nowhere in the entiregate — not in
make check, not in the pre-commit hook (script/precommitcalls
script/check), and not in CI. The script exists and is documented inthe README but is dead code.
This is not cosmetic.
script/lintrunshugo --minify --printPathWarnings,which surfaces render-target collisions that plain
hugo --minifydoes not.That signal is currently discarded.
REPO_POLICIES.mdalso requiresmake checkto runtest,lint, andfmt-check: "make check(runstest,lint,fmt-check)".Definition of done
script/checkinvokesscript/test,script/lint, andscript/fmt-check,in that canonical order.
make checkvisibly executes the lint step (its--printPathWarningsoutput appears).README.md's Entrypoints section is corrected — it currently says"
script/check— runscript/fmt-checkthenscript/test; modifiesnothing", which will no longer be true.
make checkpasses andscript/cibuildsucceeds with the lint stepincluded.
script/checkstill modifies no files (REPO_POLICIES.md: "make checkmust not modify any files in the repo"). Note that
script/testandscript/lintboth write topublic/, which is gitignored and was alreadythe case before this change; verify
git statusis clean aftermake check.TODO.mdupdated in the same commit.Note on a warning this will surface
The Hugo build currently emits:
It is a warning, not an error, so it will not fail the gate. Do not fix it in
this issue — it is tracked separately. Do not add
--panicOnWarningorotherwise escalate warnings to errors here either; that is a separate decision.
Ref:
REPO_POLICIES.md— scripts-to-rule-them-all section; canonicalscript/checkathttps://git.eeqj.de/sneak/prompts/raw/branch/main/script/check.Implementation plan
Branch
fix/check-runs-lintfrommain, in an isolated worktree.script/check— changemain()to invoke, in canonical order:"$SCRIPT_DIR/test","$SCRIPT_DIR/lint","$SCRIPT_DIR/fmt-check".The file's own header comment currently says "Runs the read-only
formatting check first, then the clean production build", which
becomes false with this change, so it gets rewritten to describe the
three-step canonical order. No other change to the script; it stays
set -euwith the sameSCRIPT_DIRresolution.README.md— correct the Entrypoints bullet from "script/check— run
script/fmt-checkthenscript/test; modifies nothing" todescribe the actual order (
script/test,script/lint,script/fmt-check), keeping the "modifies nothing" claim since itremains true for tracked files.
make fmtafterwards so prettier(4-space tabs,
proseWrap: always) reflows the list item.TODO.md— add a dated entry at the top of Completed Steps forthis change, in the same commit as the work, per the Workflow block.
The Next Step item (policy scaffold:
LICENSE,REPO_POLICIES.md,.editorconfig, prettier config) is a different task and is leftuntouched.
Verification I will run
make check— must be green and must visibly show the lint step's--printPathWarningsoutput between the test build and the prettiercheck.
git status --porcelainimmediately aftermake check— must shownothing beyond pre-existing untracked paths, confirming the gate still
modifies no tracked files (
public/is gitignored and was alreadywritten by
script/testbefore this change).script/cibuild. Because theDockerfiledoesCOPY . .thenRUN make checkwith no cache control, a green cibuild on anunchanged tree can be served from the layer cache and prove nothing
(tracked as #23). I will therefore confirm the
RUN make checklayergenuinely executed by checking the build output is not
CACHEDandcontains real Hugo and prettier output; if it is cache-served I will
force a real run with a stage-scoped
--no-cache-filterbuild and sayso explicitly in the PR. I will not run any form of
docker builder prune.The PR body will state exactly what ran and whether the cibuild run was
genuinely executed or cache-served, with the lint step's actual output
pasted.
Out of scope, per the issue — will not be touched
found no layout file for "html" for kind "taxonomy"Hugo warning(#13). It is a warning, not an error, and will not fail the gate.
--panicOnWarningor any other escalation of warnings to errors.