ci/lint: deduplicate formatting check jobs

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24257>
This commit is contained in:
Eric Engestrom
2023-07-12 15:42:23 +01:00
committed by Marge Bot
parent 59e08ad78c
commit 5ae6d5e436

View File

@@ -17,28 +17,28 @@
paths:
- results/
rustfmt:
.formatting-check:
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
stage: lint
extends:
- .use-debian/x86_64_build
- .lint-rustfmt-rules
variables:
GIT_STRATEGY: fetch
rustfmt:
extends:
- .formatting-check
- .lint-rustfmt-rules
script:
- shopt -s globstar
- rustfmt --check --verbose src/**/lib.rs
clang-format:
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
stage: lint
extends:
- .use-debian/x86_64_build
- .formatting-check
- .lint-clang-format-rules
variables:
GIT_STRATEGY: fetch
LLVM_VERSION: 15
script:
- shopt -s globstar