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: paths:
- results/ - results/
rustfmt: .formatting-check:
# Cancel job if a newer commit is pushed to the same branch # Cancel job if a newer commit is pushed to the same branch
interruptible: true interruptible: true
stage: lint stage: lint
extends: extends:
- .use-debian/x86_64_build - .use-debian/x86_64_build
- .lint-rustfmt-rules
variables: variables:
GIT_STRATEGY: fetch GIT_STRATEGY: fetch
rustfmt:
extends:
- .formatting-check
- .lint-rustfmt-rules
script: script:
- shopt -s globstar - shopt -s globstar
- rustfmt --check --verbose src/**/lib.rs - rustfmt --check --verbose src/**/lib.rs
clang-format: clang-format:
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
stage: lint
extends: extends:
- .use-debian/x86_64_build - .formatting-check
- .lint-clang-format-rules - .lint-clang-format-rules
variables: variables:
GIT_STRATEGY: fetch
LLVM_VERSION: 15 LLVM_VERSION: 15
script: script:
- shopt -s globstar - shopt -s globstar