From 4e524bc14f4709bbd64e43fad6313a1a0e42a846 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez Date: Sun, 16 Mar 2025 22:17:06 -0400 Subject: [PATCH] Update golangci-lint config --- .golangci.yml | 2 ++ Makefile | 3 +-- app.go | 2 +- helpers_test.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b4708b39..b79c04a5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -187,6 +187,8 @@ linters-settings: disabled: true # TODO: Do not disable - name: unhandled-error arguments: ['bytes\.Buffer\.Write'] + - name: unhandled-error + disabled: true stylecheck: checks: diff --git a/Makefile b/Makefile index 8a0e5f59..7e67dbc2 100644 --- a/Makefile +++ b/Makefile @@ -35,8 +35,7 @@ markdown: ## lint: 🚨 Run lint checks .PHONY: lint lint: - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.7 - golangci-lint run ./... + golangci-lint run ## test: 🚦 Execute all tests .PHONY: test diff --git a/app.go b/app.go index b2741f78..84059e79 100644 --- a/app.go +++ b/app.go @@ -1024,7 +1024,7 @@ func (app *App) Test(req *http.Request, config ...TestConfig) (*http.Response, e select { case err = <-channel: case <-time.After(cfg.Timeout): - conn.Close() //nolint:errcheck,revive // It is fine to ignore the error here + conn.Close() //nolint:errcheck // It is fine to ignore the error here if cfg.FailOnTimeout { return nil, os.ErrDeadlineExceeded } diff --git a/helpers_test.go b/helpers_test.go index 5d255956..12d6b60f 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -566,7 +566,7 @@ func Test_Utils_TestConn_Closed_Write(t *testing.T) { require.NoError(t, err) // Close early, write should fail - conn.Close() //nolint:errcheck,revive // It is fine to ignore the error here + conn.Close() //nolint:errcheck // It is fine to ignore the error here _, err = conn.Write([]byte("Response 2\n")) require.ErrorIs(t, err, errTestConnClosed)