From ad29096aa1b9dc0d1a62dc8f2aede98351289129 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 20 Dec 2024 10:01:42 +0100 Subject: [PATCH 1/2] .golangci.yml: turn off deprecated linters All these linters produced a deprecation warning. They've all been replaced by new linters, so we can safely turn them off. --- .golangci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index e0912e60b1..34d6828ea4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -145,7 +145,6 @@ linters: - unparam - wastedassign - # Disable gofumpt as it has weird behavior regarding formatting multiple # lines for a function which is in conflict with our contribution # guidelines. See https://github.com/mvdan/gofumpt/issues/235. @@ -218,6 +217,17 @@ linters: - intrange - goconst + # Deprecated linters that have been replaced by newer ones. + - deadcode + - exhaustivestruct + - ifshort + - golint + - interfacer + - varcheck + - nosnakecase + - scopelint + - structcheck + - maligned issues: # Only show newly introduced problems. From f3ddf4d8ea092f2c8bb75de6caf28c5f71793879 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 20 Dec 2024 10:02:24 +0100 Subject: [PATCH 2/2] .golangci.yml: speed up linter by updating start commit With this we allow the linter to only look at recent changes, since everything between that old commit and this most recent one has been linted correctly anyway. --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 34d6828ea4..46293ab937 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -231,7 +231,7 @@ linters: issues: # Only show newly introduced problems. - new-from-rev: 77c7f776d5cbf9e147edc81d65ae5ba177a684e5 + new-from-rev: 03eab4db64540aa5f789c617793e4459f4ba9e78 # Skip autogenerated files for mobile and gRPC as well as copied code for # internal use.