Move style-check to separate script
This avoids having to copy out of .gitlab-ci.yml before submitting an MR to do a style check. Could become a meson target at some point.
This commit is contained in:
@ -74,8 +74,7 @@ test:
|
|||||||
- apt-get -y build-dep .
|
- apt-get -y build-dep .
|
||||||
- apt-get -y install clang-tidy
|
- apt-get -y install clang-tidy
|
||||||
- ninja -C _build test
|
- ninja -C _build test
|
||||||
- cd _build
|
- tools/style-check _build
|
||||||
- clang-tidy --checks=-clang-diagnostic-missing-braces,readability-braces-around-statements, --warnings-as-errors=readability-braces-around-statements -extra-arg=-Wno-unknown-warning-option ../src/*.c ../eek/*.c ../eekboard/*.c
|
|
||||||
|
|
||||||
check_release:
|
check_release:
|
||||||
stage: test
|
stage: test
|
||||||
|
|||||||
13
tools/style-check
Executable file
13
tools/style-check
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Please pass directory to check."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$1"
|
||||||
|
clang-tidy --checks=-clang-diagnostic-missing-braces,readability-braces-around-statements, \
|
||||||
|
--warnings-as-errors=readability-braces-around-statements \
|
||||||
|
-extra-arg=-Wno-unknown-warning-option \
|
||||||
|
../src/*.c ../eek/*.c ../eekboard/*.c
|
||||||
|
|
||||||
Reference in New Issue
Block a user