1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

ci: Add lint job to run clazy on our C++ code

Suppress all failing checks for now.  They can be incrementally
enabled and fixed in the future.
This commit is contained in:
Brad King
2025-07-22 14:12:18 -04:00
parent c6b2439aad
commit bdb9d818d2
4 changed files with 46 additions and 0 deletions

View File

@@ -140,6 +140,13 @@ l:clang-analyzer-fedora42:
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
l:clazy-fedora42:
extends:
- .fedora42_clazy
- .cmake_build_linux
- .linux_x86_64_tags
- .run_automatically
# Linux builds
b:centos7-x86_64:

View File

@@ -0,0 +1,4 @@
set(configure_no_sccache 1)
set(CMake_QT_MAJOR_VERSION "5" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora42_common.cmake")

View File

@@ -0,0 +1,26 @@
export CC=/usr/bin/clang
export CXX=/usr/bin/clazy
export CLANGXX=/usr/bin/clang++
export CLAZY_CHECKS="level2\
,no-base-class-event\
,no-connect-3arg-lambda\
,no-connect-by-name\
,no-container-inside-loop\
,no-copyable-polymorphic\
,no-ctor-missing-parent-argument\
,no-function-args-by-ref\
,no-function-args-by-value\
,no-missing-qobject-macro\
,no-non-pod-global-static\
,no-old-style-connect\
,no-qproperty-without-notify\
,no-qstring-allocations\
,no-range-loop-detach\
,no-range-loop-reference\
,no-reserve-candidates\
,no-rule-of-three\
,no-rule-of-two-soft\
,no-static-pmf\
,no-strict-iterators\
"

View File

@@ -115,6 +115,15 @@
CTEST_NO_WARNINGS_ALLOWED: 1
CMAKE_CI_NO_INSTALL: 1
.fedora42_clazy:
extends: .fedora42
variables:
CMAKE_CONFIGURATION: fedora42_clazy
CMAKE_CI_BUILD_TYPE: Debug
CTEST_NO_WARNINGS_ALLOWED: 1
CMAKE_CI_NO_INSTALL: 1
.fedora42_sphinx:
extends: .fedora42