mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge branch 'simplify_clang_format' into 'master'
Make use of `git ls-files` filtering instead of piping to grep See merge request OpenMW/openmw!2457
This commit is contained in:
commit
de83a41de6
@ -3,8 +3,6 @@
|
||||
set -o pipefail
|
||||
|
||||
CLANG_FORMAT="${CLANG_FORMAT:-clang-format}"
|
||||
git ls-files |
|
||||
grep -v '^extern/' |
|
||||
grep -P '\.(cpp|hpp|h)$' |
|
||||
git ls-files -- ':(exclude)extern/' '*.cpp' '*.hpp' '*.h' |
|
||||
xargs -I '{}' -P $(nproc) bash -ec "\"${CLANG_FORMAT:?}\" --dry-run -Werror \"\${0:?}\" &> /dev/null || \"${CLANG_FORMAT:?}\" \"\${0:?}\" | git diff --color=always --no-index \"\${0:?}\" -" '{}' ||
|
||||
( echo "clang-format differences detected"; exit -1 )
|
||||
|
Loading…
Reference in New Issue
Block a user