ci: use meson to run clang-format
This will allow us to easily exclude vendored code when we enforce the formatting of more components later on. Signed-off-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23269>
This commit is contained in:

committed by
Marge Bot

parent
2f78ec7d37
commit
3ea2c1cb32
@@ -994,6 +994,9 @@
|
|||||||
rules:
|
rules:
|
||||||
- !reference [.core-rules, rules]
|
- !reference [.core-rules, rules]
|
||||||
- changes:
|
- changes:
|
||||||
|
- .clang-format
|
||||||
|
- .clang-format-include
|
||||||
|
- .clang-format-ignore
|
||||||
- src/**/asahi/**/*
|
- src/**/asahi/**/*
|
||||||
- src/**/panfrost/**/*
|
- src/**/panfrost/**/*
|
||||||
when: on_success
|
when: on_success
|
||||||
|
@@ -42,9 +42,10 @@ clang-format:
|
|||||||
LLVM_VERSION: 15
|
LLVM_VERSION: 15
|
||||||
script:
|
script:
|
||||||
- shopt -s globstar
|
- shopt -s globstar
|
||||||
- clang-format-${LLVM_VERSION:?} --Werror -i
|
# We need a meson build dir, but its config doesn't actually matter, so
|
||||||
src/**/asahi/**/*.{h,c,cpp}
|
# let's just use the default.
|
||||||
src/**/panfrost/**/*.{h,c,cpp}
|
- meson setup build
|
||||||
|
- ninja -C build clang-format
|
||||||
- git diff --color=always --exit-code # Fails if there are diffs
|
- git diff --color=always --exit-code # Fails if there are diffs
|
||||||
|
|
||||||
.test-gl:
|
.test-gl:
|
||||||
|
Reference in New Issue
Block a user