diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4f2ee74..9fad8d5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,9 +31,9 @@ jobs: path: src/github.com/goccmack/gocc - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: - version: v1.60 + version: v2.1.2 args: --issues-exit-code=0 # Do not care about output, we run golangci-lint in the Makefile again and then we do care. working-directory: ${{env.working-directory}} install-mode: "goinstall" # This is slow, but necessary if you are using a newer version of Go than golangci-lint supports diff --git a/.golangci.yml b/.golangci.yml index e551778..5e3def0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,20 +1,36 @@ -run: - timeout: 60s +version: "2" linters: enable: - dogsled - dupl - - errcheck - gocyclo - - gofmt - - goimports - misspell - prealloc - unconvert - whitespace disable: - - unused - depguard - govet - staticcheck - + - unused + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index 7ae29a2..fd4d4e9 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ ci-lint: ## see https://golangci-lint.run/, applies .golangci.yml lint: make govet - ## make ci-lint ## Temporarily disabled for go 1.24 until golangci-lint supports go 1.24 + make ci-lint goclean: gofmt ## apply go style rules to source diff --git a/go.mod b/go.mod index 12fa93c..571fd5c 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/goccmack/gocc go 1.24 -require golang.org/x/mod v0.8.0 +require golang.org/x/mod v0.24.0 diff --git a/go.sum b/go.sum index 083110b..eb2dd0f 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=