From 6bdebea8ae0287f0d5613f90784cd354d4ac2c2a Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 6 May 2024 15:44:53 +0200 Subject: [PATCH] update golangci-lint to 1.58 disable linters: - mnd (magic number checker): it seems to complain about almost anything, while there might be a few valid findings most of them are useless - canonicalheader: HTTP header syntax, most of the header are given by docker and are stable so we cannot change them anyway - execinquery: it has been deprecated goerr113 was renamed to err113 Signed-off-by: Paul Holzinger --- .golangci.yml | 5 ++++- Makefile | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 0e1bfb3f03..5a8a0d82b3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,7 +20,7 @@ linters: - dupword # too many false positives (e.g., in tests) - gocognit - testpackage - - goerr113 + - err113 - exhaustivestruct - errorlint - wrapcheck @@ -50,10 +50,12 @@ linters: - gosec - maligned - musttag # way to many warnings to fix for now, also some false positives + - mnd # way to many false positives - gomoddirectives - containedctx - contextcheck - cyclop + - canonicalheader # our current header values are fixed and should not be changed - errname - forcetypeassert - ireturn @@ -69,6 +71,7 @@ linters: - deadcode # deprecated since v1.49.0, replaced by unused - structcheck # deprecated since v1.49.0, replaced by unused - varcheck # deprecated since v1.49.0, replaced by unused + - execinquery linters-settings: errcheck: check-blank: false diff --git a/Makefile b/Makefile index 431a4493cf..cf2f0b5ab5 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ BUILDTAGS += ${EXTRA_BUILDTAGS} # N/B: This value is managed by Renovate, manual changes are # possible, as long as they don't disturb the formatting # (i.e. DO NOT ADD A 'v' prefix!) -GOLANGCI_LINT_VERSION := 1.57.2 +GOLANGCI_LINT_VERSION := 1.58.0 PYTHON ?= $(shell command -v python3 python|head -n1) PKG_MANAGER ?= $(shell command -v dnf yum|head -n1) # ~/.local/bin is not in PATH on all systems