diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f7e9407..f71a7ff 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ '1.22', '1.23' ] + go: [ '1.24', '1.23' ] name: Go Version ${{ matrix.go }} steps: - uses: actions/checkout@v3 @@ -28,7 +28,7 @@ jobs: go-version: ${{ matrix.go }} - name: Install - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.62.2 + run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.0.1 - name: Build run: make diff --git a/.golangci.yml b/.golangci.yml index bf39af8..b77ab6d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,35 +1,47 @@ +version: "2" linters: enable: - depguard - - staticcheck + - misspell + - revive - unconvert + settings: + depguard: + rules: + main: + files: + - $all + deny: + - pkg: io/ioutil + revive: + severity: error + rules: + - name: indent-error-flow + severity: warning + disabled: false + - name: error-strings + disabled: false + staticcheck: + checks: + - -SA1019 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: - gofmt - goimports - - revive - - ineffassign - - govet - - unused - - misspell - -linters-settings: - depguard: - rules: - main: - files: - - $all - deny: - - pkg: "io/ioutil" - - revive: - severity: error - rules: - - name: indent-error-flow - severity: warning - disabled: false - - - name: error-strings - disabled: false - - staticcheck: - # Suppress reports of deprecated packages - checks: ["-SA1019"] + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$