mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
lint: don't fail workflow on indent fail
There are multiple cases where good human readable code block is converted to an unreadable mess by clang-format, so we don't want to rely on clang-format completely. Also there is no way, as far as I can see, to make clang-format only fix what we want it to fix without breaking something. So let's just display hints inline where clang-format is unhappy. When reviewer sees such a warning it's a good sign that something is broken in coding-style around this warning. We add special script which parses diff generated by indent and generates warning for each hunk. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
08f286ed96
commit
d2a0d1fa64
3 changed files with 43 additions and 9 deletions
18
.github/workflows/lint.yml
vendored
18
.github/workflows/lint.yml
vendored
|
|
@ -26,15 +26,15 @@ jobs:
|
|||
run: make lint
|
||||
|
||||
- name: Run make indent
|
||||
run: >
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [ -z "${{github.base_ref}}" ]; then
|
||||
git fetch --deepen=1 &&
|
||||
if ! make indent OPTS=--diff; then
|
||||
exit 1
|
||||
fi
|
||||
git fetch --deepen=1
|
||||
make indent
|
||||
else
|
||||
git fetch origin ${{github.base_ref}} &&
|
||||
if ! make indent OPTS=--diff BASE=origin/${{github.base_ref}}; then
|
||||
exit 1
|
||||
fi
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue