Bump golangci-lint to v2.1.5 (#16545)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
pull/16339/merge
Matthieu MOREL 8 months ago committed by GitHub
parent ddb128ecee
commit 9d7a37ae18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/ci.yml
  2. 10
      .golangci.yml
  3. 2
      Makefile.common
  4. 2
      scripts/golangci-lint.yml

@ -206,7 +206,7 @@ jobs:
with: with:
args: --verbose args: --verbose
# Make sure to sync this with Makefile.common and scripts/golangci-lint.yml. # Make sure to sync this with Makefile.common and scripts/golangci-lint.yml.
version: v2.0.2 version: v2.1.5
fuzzing: fuzzing:
uses: ./.github/workflows/fuzzing.yml uses: ./.github/workflows/fuzzing.yml
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'

@ -10,10 +10,6 @@ formatters:
- prefix(github.com/prometheus/prometheus) - prefix(github.com/prometheus/prometheus)
gofumpt: gofumpt:
extra-rules: true extra-rules: true
exclusions:
paths:
# Skip autogenerated files.
- ^.*\.(pb|y)\.go$
issues: issues:
max-issues-per-linter: 0 max-issues-per-linter: 0
@ -72,9 +68,7 @@ linters:
- linters: - linters:
- godot - godot
source: "^// ===" source: "^// ==="
- linters: warn-unused: true
- perfsprint
text: "fmt.Sprintf can be replaced with string concatenation"
settings: settings:
depguard: depguard:
rules: rules:
@ -168,8 +162,6 @@ linters:
disable: disable:
- float-compare - float-compare
- go-require - go-require
- len # FIXME
- useless-assert # FIXME: wait for golangci-lint > v2.0.2
enable-all: true enable-all: true
output: output:

@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
SKIP_GOLANGCI_LINT := SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT := GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?= 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. # 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. # windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

@ -36,4 +36,4 @@ jobs:
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with: with:
args: --verbose args: --verbose
version: v2.0.2 version: v2.1.5

Loading…
Cancel
Save