8000 Avoid creating invalid default cache directories by dajiaohuang · Pull Request #1798 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Avoid creating invalid default cache directories - #1798

Open
dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/cache-invalid-dir-side-effects
Open

dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/cache-invalid-dir-side-effects

Conversation

@dajiaohuang
8000 @dajiaohuang dajiaohuang commented Oct 1, 2026 •
Copy link
Copy Markdown

When STATICCHECK_CACHE is a relative path, DefaultDir records an error but initDefaultCache still creates and opens that relative directory before Default returns the error. Stop initialization before touching the filesystem when the path is invalid; add an isolated regression.

Scope review and current validation

Removed the unrelated generic-instantiation change and its buildir fixture from this PR through a follow-up commit. That fix remains separately tracked in #1764; this PR now contains only its stated change and relevant tests.

go test ./lintcmd/cache passed all 7 package tests.
git diff --check passed. Earlier validation above is historical; the checks in this section describe the narrowed head. No live-service or all-CI-passing claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0