From 8a5f92720dc404ee1c8dc8d036f3a94b8f2e3b3b Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Sun, 24 Nov 2024 22:25:03 +0200 Subject: [PATCH] chore: update golangci-lint to v1.62.0 (#3386) --- .github/workflows/lint.yml | 2 +- codegen/testserver/followschema/directive_test.go | 2 ++ codegen/testserver/singlefile/directive_test.go | 2 ++ handler/handler.go | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 868d043b80d..024d807635d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ concurrency: jobs: golangci-lint: env: - GOLANGCI_LINT_VERSION: v1.60.2 + GOLANGCI_LINT_VERSION: v1.62.0 strategy: matrix: go: ["1.22", "1.23"] diff --git a/codegen/testserver/followschema/directive_test.go b/codegen/testserver/followschema/directive_test.go index 5d1adea51ea..eb0de412a79 100644 --- a/codegen/testserver/followschema/directive_test.go +++ b/codegen/testserver/followschema/directive_test.go @@ -112,6 +112,7 @@ func TestDirectives(t *testing.T) { srv := handler.NewDefaultServer(NewExecutableSchema(Config{ Resolvers: resolvers, Directives: DirectiveRoot{ + //nolint:revive // can't rename min, max because it's generated code Length: func(ctx context.Context, obj any, next graphql.Resolver, min int, max *int, message *string) (any, error) { e := func(msg string) error { if message == nil { @@ -133,6 +134,7 @@ func TestDirectives(t *testing.T) { } return res, nil }, + //nolint:revive // can't rename min, max because it's generated code Range: func(ctx context.Context, obj any, next graphql.Resolver, min *int, max *int) (any, error) { res, err := next(ctx) if err != nil { diff --git a/codegen/testserver/singlefile/directive_test.go b/codegen/testserver/singlefile/directive_test.go index 545ddfa9713..79dc1ee00d4 100644 --- a/codegen/testserver/singlefile/directive_test.go +++ b/codegen/testserver/singlefile/directive_test.go @@ -112,6 +112,7 @@ func TestDirectives(t *testing.T) { srv := handler.NewDefaultServer(NewExecutableSchema(Config{ Resolvers: resolvers, Directives: DirectiveRoot{ + //nolint:revive // can't rename min, max because it's generated code Length: func(ctx context.Context, obj any, next graphql.Resolver, min int, max *int, message *string) (any, error) { e := func(msg string) error { if message == nil { @@ -133,6 +134,7 @@ func TestDirectives(t *testing.T) { } return res, nil }, + //nolint:revive // can't rename min, max because it's generated code Range: func(ctx context.Context, obj any, next graphql.Resolver, min *int, max *int) (any, error) { res, err := next(ctx) if err != nil { diff --git a/handler/handler.go b/handler/handler.go index e07d10b30b8..65db6b0eb18 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -104,9 +104,9 @@ func WebsocketUpgrader(upgrader websocket.Upgrader) Option { } // Deprecated: switch to graphql/handler.New -func RecoverFunc(recover graphql.RecoverFunc) Option { +func RecoverFunc(recoverFn graphql.RecoverFunc) Option { return func(cfg *Config) { - cfg.recover = recover + cfg.recover = recoverFn } }