mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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:
parent
ced4ab4b0a
commit
295dc85ca0
1 changed files with 7 additions and 2 deletions
9
.github/workflows/lint.yml
vendored
9
.github/workflows/lint.yml
vendored
|
|
@ -9,7 +9,7 @@ jobs:
|
|||
image: registry.fedoraproject.org/fedora:latest
|
||||
steps:
|
||||
- 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
|
||||
|
||||
|
|
@ -22,7 +22,12 @@ jobs:
|
|||
|
||||
- name: Run make indent
|
||||
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) &&
|
||||
if [ ! -z "$STATUS" ]; then
|
||||
echo "FAIL: some files are not correctly formatted.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue