mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-26 11:34:32 +00:00
Check clang-format at CI stage
This commit is contained in:
parent
f62a8ee8f7
commit
dfb96ac596
@ -24,3 +24,13 @@ build_clazy_clang_tidy:
|
||||
- srcdir=`pwd` && mkdir -p /tmp/qca_build && cd /tmp/qca_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir && cat compile_commands.json | jq '[.[] | select(.file | contains("'"$srcdir"'"))]' > compile_commands.aux.json && mv compile_commands.aux.json compile_commands.json
|
||||
- CLAZY_CHECKS="level0,level1,level2,no-copyable-polymorphic,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,qproperty-type-mismatch,qrequiredresult-candidates,signal-with-return-value,thread-with-slots,tr-non-literal,unneeded-cast" ninja
|
||||
- "run-clang-tidy -header-filter='.*/qca/.*' -checks='-*,performance-*,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-use-bool-literals,modernize-redundant-void-arg,modernize-loop-convert,modernize-use-nullptr' -config=\"{WarningsAsErrors: '*'}\""
|
||||
|
||||
clang_format:
|
||||
stage: build
|
||||
image: debian:testing
|
||||
before_script:
|
||||
- apt-get update
|
||||
- apt-get install --yes --no-install-recommends git clang-format-10
|
||||
script:
|
||||
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-10 -i {} \;
|
||||
- git diff --exit-code
|
||||
|
Loading…
x
Reference in New Issue
Block a user