mirror of
https://github.com/opencontainers/runc.git
synced 2026-06-24 08:48:44 +00:00
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:
23
.github/workflows/validate.yml
vendored
23
.github/workflows/validate.yml
vendored
@@ -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
|
||||
|
||||
@@ -15,6 +15,8 @@ linters:
|
||||
enable:
|
||||
- errorlint
|
||||
- forbidigo
|
||||
- govet
|
||||
- modernize
|
||||
- nolintlint
|
||||
- unconvert
|
||||
- unparam
|
||||
|
||||
Reference in New Issue
Block a user