mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
403ea1f088
There is no need to parallelize lint and lint-extra jobs,
and they only differ with the arguments to golangci-lint.
Given that the longest time spent in these jobs is installing
libseccomp-dev, and that the second linter run can probably
benefit a lot from caching, it makes sense to merge them.
Move lint-extra from a separate job to a step in lint job.
The implementation is motivated by [1] and relies on the fact
that the last commit being fetched is the merge commit. So,
we need to set fetch-depth to 2 to be able to see the diff of
the merge commit -- and this is what golangci-lint is using.
[1] https://github.com/golangci/golangci-lint-action/issues/449#issuecomment-1096995821
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit fa83a17c57)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
16 lines
381 B
YAML
16 lines
381 B
YAML
# This is golangci-lint config file which is used to check new code in
|
|
# github PRs only (see lint-extra in .github/workflows/validate.yml).
|
|
#
|
|
# For the default linter config, see .golangci.yml. This config should
|
|
# only enable additional linters not enabled in the default config.
|
|
|
|
run:
|
|
build-tags:
|
|
- seccomp
|
|
|
|
linters:
|
|
disable-all: true
|
|
enable:
|
|
- godot
|
|
- revive
|