Skip to content

chore(hack): add golangci-lint to developer and CI workflows#63

Open
Davanum Srinivas (dims) wants to merge 1 commit into
agent-substrate:mainfrom
dims:chore/add-golangci-lint
Open

chore(hack): add golangci-lint to developer and CI workflows#63
Davanum Srinivas (dims) wants to merge 1 commit into
agent-substrate:mainfrom
dims:chore/add-golangci-lint

Conversation

@dims
Copy link
Copy Markdown
Collaborator

Adds golangci-lint v2.12.2 using the existing per-tool-module pattern. The new verifier is auto-discovered by hack/verify-all.sh, so the existing verify step in pr-workflow.yaml runs it — no workflow YAML changes.

  • Tool module + wrappers: hack/tools/golangci-lint/, hack/{,verify/,update/}golangci-lint.sh.
  • .golangci.yaml with the standard linter set (errcheck, govet, ineffassign, staticcheck, unused).
  • make lint and make lint-fix.
  • Small code adjustments so the first run is clean: two dead-code deletions, two empty-branch fixes, one return-bool simplification, and inline //nolint for six audit-tracked or intentional sites.

@dims Davanum Srinivas (dims) force-pushed the chore/add-golangci-lint branch 3 times, most recently from c728700 to 9cff48b Compare May 22, 2026 16:24
Adds golangci-lint v2.12.2 using the per-tool-module pattern under
hack/tools/golangci-lint/. The verifier at hack/verify/golangci-lint.sh
is auto-discovered by hack/verify-all.sh, so the existing CI verify
step picks it up with no workflow YAML change.

Ships .golangci.yaml with the standard linter set, make lint and
make lint-fix targets, and a verify wrapper that pins GOOS=linux so
ateom-gvisor's netlink references typecheck on macOS the same way
they do on CI.

Adjustments to keep the first run clean: two dead-code deletions
((*runsc).cmdList, MemoryPullCache.gcsClient), two SA9003 empty
branches replaced with slog.Warn / t.Logf, one S1008 return-bool
simplification, and inline //nolint for one intentional best-effort
ReleaseLock plus five audit-tracked SA1019 deprecations.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
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