ci: add clazy (#6623)

Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2025-12-06 12:59:41 +01:00
committed by GitHub
parent 7dbc73e84d
commit 71d579fc58
4 changed files with 15 additions and 1 deletions
+9
View File
@@ -2,6 +2,10 @@
set -ev;
CLANG_TIDY_VERSION=21
CLAZY_VERSION=v1.16
CLAZY_CLANG_TIDY_HASH=6ef467f518304955ef031fb74e74fa16349361919172c7f0fb622dcf4b4b7030
# aqt installs into .qtinstall/Qt/<version>/gcc_64
# This is doing the same as jurplel/install-qt-action
# See https://github.com/jurplel/install-qt-action/blob/74ca8cd6681420fc8894aed264644c7a76d7c8cb/action/src/main.ts#L52-L74
@@ -22,6 +26,11 @@ cmake -S. -Bbuild-clang-tidy \
-DBUILD_TESTS=On \
-DBUILD_BENCHMARKS=On
curl -sSLo build-clang-tidy/clazy.zip \
https://github.com/Nerixyz/clazy-ubuntu-builds/releases/download/ci/clazy-$CLAZY_VERSION-clang$CLANG_TIDY_VERSION.zip
echo "$CLAZY_CLANG_TIDY_HASH build-clang-tidy/clazy.zip" | sha256sum --check --status
unzip build-clang-tidy/clazy.zip -d /usr/lib
# Run MOC and UIC
# This will compile the dependencies
# Get the targets using `ninja -t targets | grep autogen`
+1
View File
@@ -12,6 +12,7 @@ Checks: "-*,
misc-*,
bugprone-*,
cert-*,
clazy-*,
cppcoreguidelines-*,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-vararg,
+4 -1
View File
@@ -47,6 +47,8 @@ jobs:
config_file: ".clang-tidy"
split_workflow: true
exclude: "lib/*,tools/crash-handler/*,mocks/*"
extra_arguments: "-load=/usr/lib/ClazyClangTidy21.so"
clang_tidy_version: 21
cmake_command: >-
./.CI/setup-clang-tidy.sh
apt_packages: >-
@@ -61,7 +63,8 @@ jobs:
libxcb-glx0, libxcb-icccm4, libxcb-image0, libxcb-keysyms1, libxcb-randr0,
libxcb-render-util0, libxcb-render0, libxcb-shape0, libxcb-shm0, libxcb-sync1,
libxcb-util1, libxcb-xfixes0, libxcb-xinerama0, libxcb1, libxkbcommon-dev,
libxkbcommon-x11-0, libxcb-xkb-dev, libxcb-cursor0
libxkbcommon-x11-0, libxcb-xkb-dev, libxcb-cursor0,
curl, unzip
- name: clang-tidy-review upload
uses: ZedThree/clang-tidy-review/upload@v0.22.2
+1
View File
@@ -58,6 +58,7 @@
- Dev: Unwrapped `LimitedQueueSnapshot` to `std::vector`. (#6606)
- Dev: Simplified uses of `getMessageSnapshot`. (#6607)
- Dev: Disabled `llvm-prefer-static-over-anonymous-namespace` in clang-tidy. (#6610)
- Dev: Added Clazy linting in CI. (#6623)
## 2.5.4