mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
- actions/checkout v4 -> v7 - actions/stale v5 -> v10 - actions/cache v4 -> v6 - codecov/codecov-action v5 -> v7 - mondeja/remove-labels-gh-action v1 -> v2 Assisted-by: claude-code:claude-opus-4-6 Signed-off-by: Adrian Reber <areber@redhat.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Run code linter
|
|
|
|
on: [push, pull_request]
|
|
|
|
# Cancel any preceding run on the pull request.
|
|
concurrency:
|
|
group: lint-test-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/criu-dev' }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: registry.fedoraproject.org/fedora:latest
|
|
steps:
|
|
- name: Install tools
|
|
run: sudo dnf -y install git make ruff xz clang-tools-extra codespell git-clang-format ShellCheck
|
|
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set git safe directory
|
|
# https://github.com/actions/checkout/issues/760
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Run make lint
|
|
run: make lint
|
|
|
|
- name: Run make indent
|
|
continue-on-error: true
|
|
run: |
|
|
if [ -z "${{github.base_ref}}" ]; then
|
|
git fetch --deepen=1
|
|
make indent
|
|
else
|
|
git fetch origin ${{github.base_ref}}
|
|
make indent BASE=origin/${{github.base_ref}}
|
|
fi
|
|
- name: Raise in-line make indent warnings
|
|
run: |
|
|
git diff | ./scripts/github-indent-warnings.py
|