From f95e1588193eb4ee16355e3507264dafbd73c604 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Fri, 22 May 2026 10:28:57 -0500 Subject: [PATCH] ci: update to golangci-lint v2 --- .github/workflows/scripts/golangci.yaml | 87 +++++++++++++------------ Justfile | 2 +- go.mod | 2 +- 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/.github/workflows/scripts/golangci.yaml b/.github/workflows/scripts/golangci.yaml index dfa19b8..66dcf82 100644 --- a/.github/workflows/scripts/golangci.yaml +++ b/.github/workflows/scripts/golangci.yaml @@ -1,46 +1,47 @@ -run: - timeout: 5m +version: "2" linters: enable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - copyloopvar - - dogsled - - dupword - - durationcheck - - errcheck - - errname - - errorlint - - exhaustive - - gochecknoinits - - gocritic - - gofmt - - gosimple - - govet - - ineffassign - - makezero - - misspell - - musttag - - nilnil - - noctx - - paralleltest - - perfsprint - - prealloc - - predeclared - - reassign - - revive - - rowserrcheck - - staticcheck - - sqlclosecheck - - tagalign - - tenv - - unused - - whitespace + - asasalint + - asciicheck + - bidichk + - bodyclose + - copyloopvar + - dogsled + - dupword + - durationcheck + - errname + - errorlint + - exhaustive + - gochecknoinits + - gocritic + - makezero + - misspell + - musttag + - nilnil + - noctx + - paralleltest + - perfsprint + - prealloc + - predeclared + - reassign + - revive + - rowserrcheck + - sqlclosecheck + - tagalign + - usetesting + - whitespace + settings: + exhaustive: + default-signifies-exhaustive: true + paralleltest: + ignore-missing-subtests: true + exclusions: + generated: lax + presets: + - comments +formatters: + enable: + - gofmt + exclusions: + generated: lax -linters-settings: - paralleltest: - ignore-missing-subtests: true - exhaustive: - default-signifies-exhaustive: true diff --git a/Justfile b/Justfile index f4ad079..63dfa2d 100644 --- a/Justfile +++ b/Justfile @@ -36,5 +36,5 @@ lint: vet # locally install build dependencies [group('build')] init: - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 diff --git a/go.mod b/go.mod index 9f929c5..332cc90 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module cattlecloud.net/go/scope -go 1.23 +go 1.26