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:
@@ -280,9 +280,10 @@ style conventions are in separate documents:
|
|||||||
check builds, and Go reuses one only when all its inputs are unchanged, so
|
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:
|
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
|
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
|
run, and Go builds from whatever files a kept module cache holds without
|
||||||
cache also holds test results, which is why both `go test` runs carry
|
checking them again (only `go mod verify` does), so a file changed there
|
||||||
`-count=1`.
|
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
|
- 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
|
(e.g. a web frontend compiled in a separate stage), the lint phase must
|
||||||
create placeholder files so the embed directives resolve. Example:
|
create placeholder files so the embed directives resolve. Example:
|
||||||
|
|||||||
Reference in New Issue
Block a user