ci: run custom clang-tidy module (#6626)
Inspired by https://github.com/Chatterino/chatterino2/pull/6623/files
This commit is contained in:
@@ -5,6 +5,7 @@ set -ev;
|
|||||||
CLANG_TIDY_VERSION=21
|
CLANG_TIDY_VERSION=21
|
||||||
CLAZY_VERSION=v1.16
|
CLAZY_VERSION=v1.16
|
||||||
CLAZY_CLANG_TIDY_HASH=6ef467f518304955ef031fb74e74fa16349361919172c7f0fb622dcf4b4b7030
|
CLAZY_CLANG_TIDY_HASH=6ef467f518304955ef031fb74e74fa16349361919172c7f0fb622dcf4b4b7030
|
||||||
|
CHATTERINO_CLANG_TIDY_MODULE_CLANG_TIDY_HASH=0b591a512760d13eb3d089df21991830f1131cfbeac3f1c26d44c267573fb04b
|
||||||
|
|
||||||
# aqt installs into .qtinstall/Qt/<version>/gcc_64
|
# aqt installs into .qtinstall/Qt/<version>/gcc_64
|
||||||
# This is doing the same as jurplel/install-qt-action
|
# This is doing the same as jurplel/install-qt-action
|
||||||
@@ -31,6 +32,11 @@ curl -sSLo build-clang-tidy/clazy.zip \
|
|||||||
echo "$CLAZY_CLANG_TIDY_HASH build-clang-tidy/clazy.zip" | sha256sum --check --status
|
echo "$CLAZY_CLANG_TIDY_HASH build-clang-tidy/clazy.zip" | sha256sum --check --status
|
||||||
unzip build-clang-tidy/clazy.zip -d /usr/lib
|
unzip build-clang-tidy/clazy.zip -d /usr/lib
|
||||||
|
|
||||||
|
curl -sSLo build-clang-tidy/chatterino-clang-tidy-module.zip \
|
||||||
|
https://github.com/Chatterino/clang-tidy-module/releases/download/ci/chatterino-clang-tidy-module-clang${CLANG_TIDY_VERSION}.zip
|
||||||
|
echo "$CHATTERINO_CLANG_TIDY_MODULE_CLANG_TIDY_HASH build-clang-tidy/chatterino-clang-tidy-module.zip" | sha256sum --check --status
|
||||||
|
unzip build-clang-tidy/chatterino-clang-tidy-module.zip -d /usr/lib
|
||||||
|
|
||||||
# Run MOC and UIC
|
# Run MOC and UIC
|
||||||
# This will compile the dependencies
|
# This will compile the dependencies
|
||||||
# Get the targets using `ninja -t targets | grep autogen`
|
# Get the targets using `ninja -t targets | grep autogen`
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Checks: "-*,
|
Checks: "-*,
|
||||||
clang-diagnostic-*,
|
clang-diagnostic-*,
|
||||||
llvm-*,
|
llvm-*,
|
||||||
|
chatterino-*,
|
||||||
misc-*,
|
misc-*,
|
||||||
-misc-unused-parameters,
|
-misc-unused-parameters,
|
||||||
readability-identifier-naming,
|
readability-identifier-naming,
|
||||||
|
|||||||
@@ -41,13 +41,13 @@ jobs:
|
|||||||
|
|
||||||
- name: clang-tidy review
|
- name: clang-tidy review
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
uses: ZedThree/clang-tidy-review@v0.22.2
|
uses: pajlada/clang-tidy-review@48112868b38447d10d744c10758efa1acde09944
|
||||||
with:
|
with:
|
||||||
build_dir: build-clang-tidy
|
build_dir: build-clang-tidy
|
||||||
config_file: ".clang-tidy"
|
config_file: ".clang-tidy"
|
||||||
split_workflow: true
|
split_workflow: true
|
||||||
exclude: "lib/*,tools/crash-handler/*,mocks/*"
|
exclude: "lib/*,tools/crash-handler/*,mocks/*"
|
||||||
extra_arguments: "-load=/usr/lib/ClazyClangTidy21.so"
|
extra_arguments: "--load=/usr/lib/ClazyClangTidy21.so --load=/usr/lib/chatterino-clang-tidy-module-21.so"
|
||||||
clang_tidy_version: 21
|
clang_tidy_version: 21
|
||||||
cmake_command: >-
|
cmake_command: >-
|
||||||
./.CI/setup-clang-tidy.sh
|
./.CI/setup-clang-tidy.sh
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
- Dev: Simplified uses of `getMessageSnapshot`. (#6607)
|
- Dev: Simplified uses of `getMessageSnapshot`. (#6607)
|
||||||
- Dev: Disabled `llvm-prefer-static-over-anonymous-namespace` in clang-tidy. (#6610)
|
- Dev: Disabled `llvm-prefer-static-over-anonymous-namespace` in clang-tidy. (#6610)
|
||||||
- Dev: Added Clazy linting in CI. (#6623)
|
- Dev: Added Clazy linting in CI. (#6623)
|
||||||
|
- Dev: Added custom clang-tidy module linting in CI. (#6626)
|
||||||
|
|
||||||
## 2.5.4
|
## 2.5.4
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user