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 <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2026-06-23 10:17:13 -07:00
parent c6895881bd
commit 56a14e792e
2 changed files with 2 additions and 23 deletions

View File

@@ -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

View File

@@ -15,6 +15,8 @@ linters:
enable:
- errorlint
- forbidigo
- govet
- modernize
- nolintlint
- unconvert
- unparam