2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 21:07:43 +00:00

github: use git-clang-format instead of make indent

This allows us to only detect bad formating in PR changes but not all
the CRIU codebase.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov 2022-05-31 11:25:03 +03:00 committed by Andrei Vagin
parent ced4ab4b0a
commit 295dc85ca0

View File

@ -9,7 +9,7 @@ jobs:
image: registry.fedoraproject.org/fedora:latest image: registry.fedoraproject.org/fedora:latest
steps: steps:
- name: Install tools - name: Install tools
run: sudo dnf -y install git make python3-flake8 ShellCheck clang-tools-extra which findutils codespell run: sudo dnf -y install git make python3-flake8 ShellCheck clang-tools-extra which findutils codespell git-clang-format
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -22,7 +22,12 @@ jobs:
- name: Run make indent - name: Run make indent
run: > run: >
make indent && if [ -z "${{github.base_ref}}" ]; then
make indent
else
git fetch origin ${{github.base_ref}} &&
git clang-format --style file --extensions c,h --quiet origin/${{github.base_ref}}
fi &&
STATUS=$(git status --porcelain) && STATUS=$(git status --porcelain) &&
if [ ! -z "$STATUS" ]; then if [ ! -z "$STATUS" ]; then
echo "FAIL: some files are not correctly formatted."; echo "FAIL: some files are not correctly formatted.";