ci: upgrade golangci-lint to 2.3.0

Upgrades the configuration file from V1 to V2 format which was pretty
straightforward. The vendor/ directory no longer needs to be excluded as
it is a default now in 2.x.

Updates the pre-commit configuration to the latest and greatest version.
This commit is contained in:
Lukas Zapletal 2025-07-23 11:30:45 +02:00 committed by Michael Vogt
parent 27ad7cb6f0
commit 2828ee63cf
3 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,5 @@
--- ---
exclude-dirs: version: "2"
- vendor
linters-settings: linters-settings:
govet: govet:

View file

@ -20,7 +20,7 @@ repos:
- id: pyspelling - id: pyspelling
args: ["--config", ".spellcheck.yml"] args: ["--config", ".spellcheck.yml"]
- repo: https://github.com/golangci/golangci-lint - repo: https://github.com/golangci/golangci-lint
rev: v1.63.1 rev: v2.3.0
hooks: hooks:
- id: golangci-lint - id: golangci-lint
- repo: https://github.com/hhatto/autopep8 - repo: https://github.com/hhatto/autopep8

View file

@ -22,7 +22,7 @@ RST2MAN ?= rst2man
# see https://hub.docker.com/r/docker/golangci-lint/tags # see https://hub.docker.com/r/docker/golangci-lint/tags
# v1.55 to get golang 1.21 (1.21.3) # v1.55 to get golang 1.21 (1.21.3)
# v1.53 to get golang 1.20 (1.20.5) # v1.53 to get golang 1.20 (1.20.5)
GOLANGCI_LINT_VERSION=v1.55 GOLANGCI_LINT_VERSION=v2.3.0
GOLANGCI_LINT_CACHE_DIR=$(HOME)/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION) GOLANGCI_LINT_CACHE_DIR=$(HOME)/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION)
GOLANGCI_COMPOSER_IMAGE=composer_golangci GOLANGCI_COMPOSER_IMAGE=composer_golangci
# #