From c17ca37e48eacfc8f661adcc648d854cb7ee4a80 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 11 Nov 2024 11:23:37 +0100 Subject: [PATCH] chore: update linter (#2341) --- .github/workflows/pr.yml | 2 +- .golangci.yml | 6 ++++-- providers/dns/auroradns/auroradns_test.go | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9406fe49..d7404a6b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest env: GO_VERSION: stable - GOLANGCI_LINT_VERSION: v1.60.1 + GOLANGCI_LINT_VERSION: v1.62.0 HUGO_VERSION: 0.131.0 CGO_ENABLED: 0 LEGO_E2E_TESTS: CI diff --git a/.golangci.yml b/.golangci.yml index b280d83b..b3383969 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,11 +1,9 @@ linters: enable-all: true disable: - - gomnd # deprecated - cyclop # duplicate of gocyclo - sqlclosecheck # not relevant (SQL) - rowserrcheck # not relevant (SQL) - - execinquery # not relevant (SQL) - lll - gosec - dupl # not relevant @@ -255,6 +253,10 @@ issues: text: 'cyclomatic complexity 13 of func `\(\*DNSProvider\)\.CleanUp` is high' linters: - gocyclo + - path: providers/dns/servercow/internal/types.go + text: 'the methods of "Value" use pointer receiver and non-pointer receiver.' + linters: + - recvcheck # Those elements have been replaced by non-exposed structures. - path: providers/dns/linode/linode_test.go diff --git a/providers/dns/auroradns/auroradns_test.go b/providers/dns/auroradns/auroradns_test.go index 6e4aa54a..cbd51b83 100644 --- a/providers/dns/auroradns/auroradns_test.go +++ b/providers/dns/auroradns/auroradns_test.go @@ -163,7 +163,7 @@ func TestDNSProvider_Present(t *testing.T) { reqBody, err := io.ReadAll(r.Body) require.NoError(t, err) - assert.Equal(t, `{"type":"TXT","name":"_acme-challenge","content":"w6uP8Tcg6K2QR905Rms8iXTlksL6OD1KOWBxTK7wxPI","ttl":300}`, string(reqBody)) + assert.JSONEq(t, `{"type":"TXT","name":"_acme-challenge","content":"w6uP8Tcg6K2QR905Rms8iXTlksL6OD1KOWBxTK7wxPI","ttl":300}`, string(reqBody)) w.WriteHeader(http.StatusCreated) fmt.Fprintf(w, `{