Update golangci-lint config

fix-lint
Juan Calderon-Perez 2025-03-16 22:17:06 -04:00
parent bdb405eb5b
commit 4e524bc14f
4 changed files with 5 additions and 4 deletions

View File

@ -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:

View File

@ -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

2
app.go
View File

@ -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
}

View File

@ -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)