mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
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:
parent
2f78ec7d37
commit
3ea2c1cb32
2 changed files with 7 additions and 3 deletions
|
|
@ -994,6 +994,9 @@
|
|||
rules:
|
||||
- !reference [.core-rules, rules]
|
||||
- changes:
|
||||
- .clang-format
|
||||
- .clang-format-include
|
||||
- .clang-format-ignore
|
||||
- src/**/asahi/**/*
|
||||
- src/**/panfrost/**/*
|
||||
when: on_success
|
||||
|
|
|
|||
|
|
@ -42,9 +42,10 @@ clang-format:
|
|||
LLVM_VERSION: 15
|
||||
script:
|
||||
- shopt -s globstar
|
||||
- clang-format-${LLVM_VERSION:?} --Werror -i
|
||||
src/**/asahi/**/*.{h,c,cpp}
|
||||
src/**/panfrost/**/*.{h,c,cpp}
|
||||
# We need a meson build dir, but its config doesn't actually matter, so
|
||||
# let's just use the default.
|
||||
- meson setup build
|
||||
- ninja -C build clang-format
|
||||
- git diff --color=always --exit-code # Fails if there are diffs
|
||||
|
||||
.test-gl:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue