diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b3ac384d3..8e2e0220c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -38,9 +38,9 @@ jobs: run: | sudo apt -q update sudo apt -qy install libseccomp-dev - - uses: golangci/golangci-lint-action@v6 + - uses: golangci/golangci-lint-action@v7 with: - version: v1.64 + version: v2.0 # Extra linters, only checking new code from a pull request. - name: lint-extra if: github.event_name == 'pull_request' diff --git a/.golangci-extra.yml b/.golangci-extra.yml index be33f90d7..0b27a1bf0 100644 --- a/.golangci-extra.yml +++ b/.golangci-extra.yml @@ -3,13 +3,19 @@ # # For the default linter config, see .golangci.yml. This config should # only enable additional linters not enabled in the default config. +version: "2" run: build-tags: - seccomp linters: - disable-all: true + default: none enable: - godot - revive + - staticcheck + settings: + staticcheck: + checks: + - all diff --git a/.golangci.yml b/.golangci.yml index 64c285cd0..5d31ed92a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,18 +1,30 @@ -# For documentation, see https://golangci-lint.run/usage/configuration/ +version: "2" run: build-tags: - seccomp -linters: +formatters: enable: - gofumpt + +linters: + enable: - errorlint - nolintlint - unconvert - unparam - -linters-settings: - govet: - enable: - - nilness + settings: + govet: + enable: + - nilness + staticcheck: + checks: + - all + - -ST1000 # https://staticcheck.dev/docs/checks/#ST1000 Incorrect or missing package comment. + - -ST1003 # https://staticcheck.dev/docs/checks/#ST1003 Poorly chosen identifier. + - -ST1005 # https://staticcheck.dev/docs/checks/#ST1005 Incorrectly formatted error string. + - -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression. + exclusions: + presets: + - std-error-handling