From 888b0be069b70d53dbed82fdea242ee865417ac3 Mon Sep 17 00:00:00 2001 From: bump Date: Wed, 7 Feb 2024 16:04:24 +0000 Subject: [PATCH] Update github-golangci-lint to 1.56.0 from 1.55.2 Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.56.0 Remove some nolint:errorlint not needed anymore --- .github/workflows/ci.yml | 2 +- pkg/cli/cli.go | 2 +- pkg/fqtest/fqtest.go | 2 +- pkg/interp/interp.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07e4116c..8e2753af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: env: - GOLANGCILINT_VERSION: "1.55.2" + GOLANGCILINT_VERSION: "1.56.0" jobs: lint: diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 6665bcf8..26ecf91f 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -260,7 +260,7 @@ func Main(r *interp.Registry, version string) { } if err := i.Main(context.Background(), sos.Stdout(), version); err != nil { - if ex, ok := err.(interp.Exiter); ok { //nolint:errorlint + if ex, ok := err.(interp.Exiter); ok { return ex.ExitCode() } return 1 diff --git a/pkg/fqtest/fqtest.go b/pkg/fqtest/fqtest.go index affbf718..9ba09495 100644 --- a/pkg/fqtest/fqtest.go +++ b/pkg/fqtest/fqtest.go @@ -43,7 +43,7 @@ func TestPath(t *testing.T, registry *interp.Registry, update bool) { err = i.Main(context.Background(), cr.Stdout(), "testversion") if err != nil { - if ex, ok := err.(interp.Exiter); ok { //nolint:errorlint + if ex, ok := err.(interp.Exiter); ok { cr.ActualExitCode = ex.ExitCode() } } diff --git a/pkg/interp/interp.go b/pkg/interp/interp.go index 502531b8..bbca4b4c 100644 --- a/pkg/interp/interp.go +++ b/pkg/interp/interp.go @@ -300,7 +300,7 @@ func toBytes(v any) ([]byte, error) { func queryErrorPosition(expr string, v error) pos.Pos { var offset int - if tokIf, ok := v.(interface{ Token() (string, int) }); ok { //nolint:errorlint + if tokIf, ok := v.(interface{ Token() (string, int) }); ok { _, offset = tokIf.Token() } if offset >= 0 { @@ -403,7 +403,7 @@ func (i *Interp) Main(ctx context.Context, output Output, versionStr string) err switch v := v.(type) { case error: - if emptyErr, ok := v.(IsEmptyErrorer); ok && emptyErr.IsEmptyError() { //nolint:errorlint + if emptyErr, ok := v.(IsEmptyErrorer); ok && emptyErr.IsEmptyError() { // no output } else if errors.Is(v, context.Canceled) { // ignore context cancel here for now, which means user somehow interrupted the interpreter