fix(go,cli,mockserver,terraform): bump staticcheck to v0.8.2 for Go 1.27.2
Why
After generating a Go-based target, the generator lints the output with go run honnef.co/go/tools/cmd/staticcheck@v0.8.1. Go 1.27.2 changed the compiler export data format, which staticcheck v0.8.1 cannot read, so with a Go 1.27.2+ toolchain the lint step fails and generation exits non-zero:
-: internal error in importing "internal/byteorder" (cannot decode "internal/byteorder", export data version 5 is greater than maximum supported version 4); please report an issue (compile)
ERROR lint failed: exit status 1
Generation with Go 1.26.x is unaffected. staticcheck 2026.2.2 (v0.8.2) adds support for the Go 1.27.2 export data format.
What changed
- Bump the staticcheck pin from
v0.8.1tov0.8.2in the lint configuration of thego,cli,mockserverandterraformtargets. The-checksflags are unchanged. - Changeset:
core/go, cli, mockserver, terraform, patch.
The pin is only used by the generator's lint step and is not written into generated output, so the review SDKs do not change.
Testing
Each case generates from a small OpenAPI document and lets the generator run its own compile and lint steps.
| Case | Go toolchain | Before (v0.8.1) | After (v0.8.2) |
|---|---|---|---|
go | 1.27.2 | exit 1, export data error at lint | exit 0, lint clean |
cli | 1.27.2 | exit 1, export data error at lint | exit 0, lint clean |
terraform (document with one x-speakeasy-entity) | 1.27.2 | exit 1, export data error at lint | exit 0, lint clean |
go with generateTests / generateNewTests (SDK lint, then mock server lint) | 1.27.2 | exit 1 at SDK lint, mock server lint not reached | exit 0, both lints clean |
mock server lint command run directly on generated tests/mockserver | 1.27.2 | exit 1, export data error | exit 0 |
go | 1.26.10 | not run (known working) | exit 0, lint clean |
staticcheck v0.8.2 reported no new findings on any of the generated output above.
Not run locally, left to CI: make lint, npm run format, make check-template-*, and the full make test-* suites against the larger test specs. The change is a version string inside existing string literals.
Public-safety check
- This change contains no credentials, customer documents, private repository URLs, private filesystem paths, or unredacted private logs.
- Title, body, comments, and commit messages name no customers or customer-derived identifiers, private paths or trackers, or workflow provenance, and are understandable without private context (
.claude/skills/public-repo-communication/SKILL.md). - Generated fixtures and review SDK changes are public-safe.
- I reviewed
git diff --check.
Summary by cubic
Bumps the staticcheck pin from v0.8.1 to v0.8.2 in the go, cli, mockserver, and terraform target lint configurations. Go 1.27.2 changed the compiler export data format, which v0.8.1 cannot read, so the post-generation lint step failed with an export data version error whenever the local toolchain was Go 1.27.2 or newer; v0.8.2 supports the new format. Go 1.26.x is unaffected, and the -checks flags are unchanged. The pin only affects the generator's lint step and is not written into generated output, so generated SDKs do not change.