1
0
mirror of https://github.com/prometheus/prometheus.git synced 2025-02-06 09:44:24 +00:00

chore: Upgrade to golangci-lint v1.63.4 (#15799)

update golangci-lint and enable more lntiers

This updates golangci-lint to v1.63.4 and enables linters
`nilnesserr` and `exptostd`

Signed-off-by: dongjiang <dongjiang1989@126.com>

---------

Signed-off-by: dongjiang <dongjiang1989@126.com>
This commit is contained in:
dongjiang 2025-01-15 02:22:22 +08:00 committed by GitHub
parent 7be00791ef
commit b3a9fa3df9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 5 deletions

View File

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

View File

@ -5,25 +5,28 @@ output:
sort-results: true
linters:
# Keep this list sorted alphabetically
enable:
- depguard
- errorlint
- exptostd
- gocritic
- godot
- gofumpt
- goimports
- loggercheck
- misspell
- nilnesserr
- nolintlint
- perfsprint
- predeclared
- revive
- sloglint
- testifylint
- unconvert
- unused
- usestdlibvars
- whitespace
- loggercheck
- sloglint
issues:
max-issues-per-linter: 0

View File

@ -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 ?= v1.62.0
GOLANGCI_LINT_VERSION ?= v1.63.4
# 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))

View File

@ -36,4 +36,4 @@ jobs:
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
args: --verbose
version: v1.62.0
version: v1.63.4