From f4884bded0bc1473804a9ee04fe3e001c0435f46 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Sun, 26 Apr 2026 06:08:40 -0500 Subject: [PATCH] ci: update to golangci-lint v2 --- .github/workflows/scripts/golangci.yaml | 87 +++++++++++++------------ Justfile | 3 +- go.mod | 6 +- go.sum | 8 +-- 4 files changed, 53 insertions(+), 51 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 aadecb6..a2bddb5 100644 --- a/Justfile +++ b/Justfile @@ -42,4 +42,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 e78a874..eea071a 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module cattlecloud.net/go/forms -go 1.23 +go 1.26 require ( - github.com/shoenig/go-conceal v0.5.4 - github.com/shoenig/lang v0.0.6 + github.com/shoenig/go-conceal v0.5.6 + github.com/shoenig/lang v0.0.7 github.com/shoenig/test v1.12.2 ) diff --git a/go.sum b/go.sum index 4b14e5a..b025ab4 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/shoenig/go-conceal v0.5.4 h1:xLzarDUw3vUJjz+DirzO58yijkX4I9F1KA+RPZMLGLY= -github.com/shoenig/go-conceal v0.5.4/go.mod h1:LXmjZn/bO1Nrtvfex4VNbKViVE+aMhVvskZx8o7HBfs= -github.com/shoenig/lang v0.0.6 h1:i8NVe+fNQLUGXk+KPP6lB6Jcfmcrmc9nCEYknHsBbVQ= -github.com/shoenig/lang v0.0.6/go.mod h1:DStvcG5yPYr/xBBcTEaousm+Pqjn9ozAKfyqWwfhj34= +github.com/shoenig/go-conceal v0.5.6 h1:K2j8Ql6U4YrBxCRaNF/AnuYaeG8dmf2HcApc7nEdmpk= +github.com/shoenig/go-conceal v0.5.6/go.mod h1:rP6ts7GI3lTWQu0gZBWN/aLR1YrdqvrAZbT8cxzxd2A= +github.com/shoenig/lang v0.0.7 h1:0F7/U1ria0edQPYf0e4zX+hJ2Wxo4UPss2fydWkqvCw= +github.com/shoenig/lang v0.0.7/go.mod h1:DStvcG5yPYr/xBBcTEaousm+Pqjn9ozAKfyqWwfhj34= github.com/shoenig/test v1.12.2 h1:ZVT8NeIUwGWpZcKaepPmFMoNQ3sVpxvqUh/MAqwFiJI= github.com/shoenig/test v1.12.2/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI=