mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Fix clang-tidy on CI and introduce .clang-tidy file
This commit is contained in:
parent
80adcf3c88
commit
c3e2f84273
3 changed files with 11 additions and 22 deletions
8
.clang-tidy
Normal file
8
.clang-tidy
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
Checks: "-*,
|
||||||
|
boost-*,
|
||||||
|
portability-*,
|
||||||
|
"
|
||||||
|
WarningsAsErrors: ''
|
||||||
|
HeaderFilterRegex: ''
|
||||||
|
FormatStyle: none
|
|
@ -55,26 +55,6 @@ variables:
|
||||||
paths:
|
paths:
|
||||||
- build/install/
|
- build/install/
|
||||||
|
|
||||||
Clang_Tidy:
|
|
||||||
extends: .Ubuntu_Image
|
|
||||||
stage: build
|
|
||||||
rules:
|
|
||||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
||||||
before_script:
|
|
||||||
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic clang-tidy clang
|
|
||||||
script:
|
|
||||||
- CI/before_script.linux.sh
|
|
||||||
- cd build
|
|
||||||
- cmake --build . -- -j $(nproc) openmw esmtool bsatool niftest openmw-wizard openmw-launcher openmw-iniimporter openmw-essimporter
|
|
||||||
variables:
|
|
||||||
CC: clang
|
|
||||||
CXX: clang++
|
|
||||||
CI_CLANG_TIDY: 1
|
|
||||||
timeout: 8h
|
|
||||||
artifacts:
|
|
||||||
paths: []
|
|
||||||
expire_in: 1 minute
|
|
||||||
|
|
||||||
Coverity:
|
Coverity:
|
||||||
extends: .Ubuntu_Image
|
extends: .Ubuntu_Image
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -261,12 +241,13 @@ Ubuntu_GCC:
|
||||||
Ubuntu_Clang:
|
Ubuntu_Clang:
|
||||||
extends: .Ubuntu
|
extends: .Ubuntu
|
||||||
before_script:
|
before_script:
|
||||||
- CI/install_debian_deps.sh clang openmw-deps openmw-deps-dynamic
|
- CI/install_debian_deps.sh clang clang-tidy openmw-deps openmw-deps-dynamic
|
||||||
cache:
|
cache:
|
||||||
key: Ubuntu_Clang.v2
|
key: Ubuntu_Clang.v2
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
|
CI_CLANG_TIDY: 1
|
||||||
CCACHE_SIZE: 2G
|
CCACHE_SIZE: 2G
|
||||||
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
|
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
|
||||||
timeout: 2h
|
timeout: 2h
|
||||||
|
|
|
@ -43,7 +43,7 @@ fi
|
||||||
|
|
||||||
if [[ $CI_CLANG_TIDY ]]; then
|
if [[ $CI_CLANG_TIDY ]]; then
|
||||||
CMAKE_CONF_OPTS+=(
|
CMAKE_CONF_OPTS+=(
|
||||||
-DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=-*,boost-*,clang-analyzer-*,concurrency-*,performance-*,-header-filter=.*,bugprone-*,misc-definitions-in-headers,misc-misplaced-const,misc-redundant-expression,-bugprone-narrowing-conversions"
|
-DCMAKE_CXX_CLANG_TIDY="clang-tidy;--warnings-as-errors=*"
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue