diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 90f9b89..e4c3034 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,5 +24,5 @@ jobs: just sysinfo - name: Run Go Test run: | - just init tidy lint test + just init tidy lint tests diff --git a/.github/workflows/scripts/golangci.yaml b/.github/workflows/scripts/golangci.yaml index c349a9a..66dcf82 100644 --- a/.github/workflows/scripts/golangci.yaml +++ b/.github/workflows/scripts/golangci.yaml @@ -1,47 +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 - -linters-settings: - paralleltest: - ignore-missing-subtests: true - exhaustive: - default-signifies-exhaustive: true + - 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 diff --git a/Justfile b/Justfile index 84f9bfe..58b4007 100644 --- a/Justfile +++ b/Justfile @@ -15,7 +15,7 @@ tidy: # run tests across source tree [group('build')] -test: +tests: go test -v -race -count=1 ./... # apply go vet command on source tree @@ -36,4 +36,4 @@ 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 5307a22..293df1d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module cattlecloud.net/go/urlpath -go 1.24 +go 1.26 require ( github.com/gorilla/mux v1.8.1