script/check does not run script/lint, so lint is ungated in CI #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.