diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 880f670d..5971ff0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: cache: true - uses: golangci/golangci-lint-action@v3 with: - version: v1.51.2 + version: v1.55.2 args: --timeout 5m - name: Test run: go test ./... diff --git a/ci/Dockerfile b/ci/Dockerfile index 3c916d07..3d79eb01 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -16,7 +16,7 @@ FROM golang:1.20 WORKDIR /go/src -ARG GOLANGCILINT_VERSION=v1.51.2 +ARG GOLANGCILINT_VERSION=v1.55.2 RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCILINT_VERSION} RUN go install github.com/kunalkushwaha/ltag@latest && rm -rf /go/src/github.com/kunalkushwaha diff --git a/loader/loader.go b/loader/loader.go index d050b698..3977da75 100644 --- a/loader/loader.go +++ b/loader/loader.go @@ -101,7 +101,7 @@ func (l localResourceLoader) Accept(p string) bool { return err == nil } -func (l localResourceLoader) Load(ctx context.Context, p string) (string, error) { +func (l localResourceLoader) Load(_ context.Context, p string) (string, error) { return l.abs(p), nil } diff --git a/loader/loader_test.go b/loader/loader_test.go index 908b581b..2712aef2 100644 --- a/loader/loader_test.go +++ b/loader/loader_test.go @@ -2598,7 +2598,7 @@ func (c customLoader) Accept(s string) bool { return strings.HasPrefix(s, c.prefix+":") } -func (c customLoader) Load(ctx context.Context, s string) (string, error) { +func (c customLoader) Load(_ context.Context, s string) (string, error) { path := filepath.Join("testdata", c.prefix, s[len(c.prefix)+1:]) _, err := os.Stat(path) if err != nil { diff --git a/override/merge.go b/override/merge.go index 66ea8a3f..e7ef0e2b 100644 --- a/override/merge.go +++ b/override/merge.go @@ -107,7 +107,7 @@ func mergeLogging(c any, o any, p tree.Path) (any, error) { } // environment must be first converted into yaml sequence syntax so we can append -func mergeEnvironment(c any, o any, p tree.Path) (any, error) { +func mergeEnvironment(c any, o any, _ tree.Path) (any, error) { right := convertIntoSequence(c) left := convertIntoSequence(o) return append(right, left...), nil @@ -136,7 +136,7 @@ func convertIntoSequence(value any) []any { return nil } -func mergeUlimit(c any, o any, p tree.Path) (any, error) { +func mergeUlimit(_ any, o any, p tree.Path) (any, error) { over, ismapping := o.(map[string]any) if base, ok := o.(map[string]any); ok && ismapping { return mergeMappings(base, over, p) @@ -144,6 +144,6 @@ func mergeUlimit(c any, o any, p tree.Path) (any, error) { return o, nil } -func override(c any, other any, p tree.Path) (any, error) { +func override(_ any, other any, _ tree.Path) (any, error) { return other, nil } diff --git a/override/uncity.go b/override/uncity.go index 854f6086..85e52b13 100644 --- a/override/uncity.go +++ b/override/uncity.go @@ -82,7 +82,7 @@ func enforceUnicity(value any, p tree.Path) (any, error) { return value, nil } -func environmentIndexer(y any, p tree.Path) (string, error) { +func environmentIndexer(y any, _ tree.Path) (string, error) { value := y.(string) key, _, found := strings.Cut(value, "=") if !found { diff --git a/transform/include.go b/transform/include.go index c39be11f..c28a94ff 100644 --- a/transform/include.go +++ b/transform/include.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" ) -func transformInclude(data any, p tree.Path) (any, error) { +func transformInclude(data any, _ tree.Path) (any, error) { switch v := data.(type) { case map[string]any: return v, nil diff --git a/transform/ports.go b/transform/ports.go index edf8e350..b6180738 100644 --- a/transform/ports.go +++ b/transform/ports.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" ) -func transformPorts(data any, p tree.Path) (any, error) { +func transformPorts(data any, _ tree.Path) (any, error) { switch entries := data.(type) { case []any: // We process the list instead of individual items here. diff --git a/transform/services.go b/transform/services.go index 5201e80e..5a290efa 100644 --- a/transform/services.go +++ b/transform/services.go @@ -25,7 +25,7 @@ func transformService(data any, p tree.Path) (any, error) { return transformMapping(value, p) } -func transformServiceNetworks(data any, p tree.Path) (any, error) { +func transformServiceNetworks(data any, _ tree.Path) (any, error) { if slice, ok := data.([]any); ok { networks := make(map[string]any, len(slice)) for _, net := range slice { diff --git a/transform/ssh.go b/transform/ssh.go index 89801f6f..640a1088 100644 --- a/transform/ssh.go +++ b/transform/ssh.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" ) -func transformSSH(data any, p tree.Path) (any, error) { +func transformSSH(data any, _ tree.Path) (any, error) { switch v := data.(type) { case map[string]any: return v, nil diff --git a/transform/ulimits.go b/transform/ulimits.go index c094b4c1..ba9e3879 100644 --- a/transform/ulimits.go +++ b/transform/ulimits.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" ) -func transformUlimits(data any, p tree.Path) (any, error) { +func transformUlimits(data any, _ tree.Path) (any, error) { switch v := data.(type) { case map[string]any: return v, nil diff --git a/transform/volume.go b/transform/volume.go index a5bac1ab..c1d592b2 100644 --- a/transform/volume.go +++ b/transform/volume.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" ) -func transformVolumeMount(data any, p tree.Path) (any, error) { +func transformVolumeMount(data any, _ tree.Path) (any, error) { switch v := data.(type) { case map[string]any: return v, nil