Give a reason that holds for not keeping the module cache
check / check (push) Canceled after 0s

Go builds from whatever files a kept module cache holds without
checking them again, so a changed file would go unnoticed; skipping a
download skipped no check and was no reason.

Model: opus-5-5
This commit is contained in:
2026-10-15 14:22:46 +00:00
parent ae3bef5362
commit d19b604797
+4 -3
View File
@@ -280,9 +280,10 @@ style conventions are in separate documents:
check builds, and Go reuses one only when all its inputs are unchanged, so
it saves the compile without skipping a check. Nothing else is kept:
golangci-lint's own cache would replay stored findings in place of a lint
run, and the module cache would skip downloading the modules. Go's build
cache also holds test results, which is why both `go test` runs carry
`-count=1`.
run, and Go builds from whatever files a kept module cache holds without
checking them again (only `go mod verify` does), so a file changed there
would go unnoticed. Go's build cache also holds test results, which is why
both `go test` runs carry `-count=1`.
- If the project uses `//go:embed` directives that reference build artifacts
(e.g. a web frontend compiled in a separate stage), the lint phase must
create placeholder files so the embed directives resolve. Example: