diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbbef8b699..fadf67ade0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,7 +206,7 @@ jobs: with: args: --verbose # Make sure to sync this with Makefile.common and scripts/golangci-lint.yml. - version: v2.0.2 + version: v2.1.5 fuzzing: uses: ./.github/workflows/fuzzing.yml if: github.event_name == 'pull_request' diff --git a/.golangci.yml b/.golangci.yml index 37b488f812..4616feab55 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,10 +10,6 @@ formatters: - prefix(github.com/prometheus/prometheus) gofumpt: extra-rules: true - exclusions: - paths: - # Skip autogenerated files. - - ^.*\.(pb|y)\.go$ issues: max-issues-per-linter: 0 @@ -72,9 +68,7 @@ linters: - linters: - godot source: "^// ===" - - linters: - - perfsprint - text: "fmt.Sprintf can be replaced with string concatenation" + warn-unused: true settings: depguard: rules: @@ -168,8 +162,6 @@ linters: disable: - float-compare - go-require - - len # FIXME - - useless-assert # FIXME: wait for golangci-lint > v2.0.2 enable-all: true output: diff --git a/Makefile.common b/Makefile.common index 81bad5f42d..d8b7989096 100644 --- a/Makefile.common +++ b/Makefile.common @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_ SKIP_GOLANGCI_LINT := GOLANGCI_LINT := GOLANGCI_LINT_OPTS ?= -GOLANGCI_LINT_VERSION ?= v2.0.2 +GOLANGCI_LINT_VERSION ?= v2.1.5 # golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64. # windows isn't included here because of the path separator being different. ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) diff --git a/scripts/golangci-lint.yml b/scripts/golangci-lint.yml index 3893ef86b1..672dd424d6 100644 --- a/scripts/golangci-lint.yml +++ b/scripts/golangci-lint.yml @@ -36,4 +36,4 @@ jobs: uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 with: args: --verbose - version: v2.0.2 + version: v2.1.5