diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9e496479..0cf1d256 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - uses: golangci/golangci-lint-action@v3 with: - version: v1.52.2 + version: v1.53.3 go-mod-tidy: runs-on: ubuntu-20.04 diff --git a/.golangci.yml b/.golangci.yml index 45f0aaa3..dadbd3f6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,11 +7,13 @@ linters: - gocritic - gofmt - gofumpt - - misspell - lll + - misspell + - nilerr - prealloc - revive - unconvert + - wastedassign - whitespace disable: - errcheck diff --git a/Makefile b/Makefile index d2fdf8ab..9408d6bc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BASE_IMAGE = golang:1.20.1-alpine3.17 -LINT_IMAGE = golangci/golangci-lint:v1.52.2 +LINT_IMAGE = golangci/golangci-lint:v1.53.3 .PHONY: $(shell ls) diff --git a/server_test.go b/server_test.go index d59f782f..f2ce23fd 100644 --- a/server_test.go +++ b/server_test.go @@ -1052,7 +1052,7 @@ func TestServerAuth(t *testing.T) { onAnnounce: func(ctx *ServerHandlerOnAnnounceCtx) (*base.Response, error) { err := auth.Validate(ctx.Request, "myuser", "mypass", nil, nil, "IPCAM", nonce) if err != nil { - return &base.Response{ + return &base.Response{ //nolint:nilerr StatusCode: base.StatusUnauthorized, Header: base.Header{ "WWW-Authenticate": auth.GenerateWWWAuthenticate(nil, "IPCAM", nonce),