mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-10 10:13:50 +08:00
chore(hack): add golangci-lint
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, a make lint target, 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.Error / t.Logf, one S1008 return-bool simplification, and inline //nolint for one intentional best-effort ReleaseLock plus four audit-tracked SA1019 deprecations. Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
committed by
Tim Hockin
parent
80a883c589
commit
55923825c7
@@ -24,7 +24,6 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"cloud.google.com/go/storage"
|
||||
"github.com/google/go-containerregistry/pkg/authn"
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
@@ -34,8 +33,6 @@ import (
|
||||
)
|
||||
|
||||
type MemoryPullCache struct {
|
||||
gcsClient *storage.Client
|
||||
|
||||
gcpAuthenticator authn.Authenticator
|
||||
|
||||
localhostRegistryReplacement string
|
||||
|
||||
Reference in New Issue
Block a user