From 56a14e792ee26d4ec7a096266a03a010e4c382dd Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 23 Jun 2026 10:17:13 -0700 Subject: [PATCH] ci: replace modernize job with golangci linters Instead of using a standalone modernize (and a separate job), add modernize and go vet (which should be same-as/similar-to go fix) linters to golangci-lint config. Signed-off-by: Kir Kolyshkin --- .github/workflows/validate.yml | 23 ----------------------- .golangci.yml | 2 ++ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 835d80d74..3279379f8 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -52,28 +52,6 @@ jobs: run: | golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1 - modernize: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 2 - - uses: actions/setup-go@v6 - with: - go-version: stable # modernize@latest may require latest Go. - - name: install deps - run: | - sudo apt -q update - sudo apt -qy install libseccomp-dev - - name: run go fix - run: | - go fix ./... - git diff --exit-code - - name: run modernize - run: | - go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix ./... - git diff --exit-code - compile-buildtags: runs-on: ubuntu-24.04 env: @@ -328,7 +306,6 @@ jobs: - get-images - keyring - lint - - modernize - release - shellcheck - shfmt diff --git a/.golangci.yml b/.golangci.yml index c5ed654c7..6fe213dfc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,6 +15,8 @@ linters: enable: - errorlint - forbidigo + - govet + - modernize - nolintlint - unconvert - unparam