Skip to content

Commit 8ddeb52

Browse files
committed
Test clang-tiny to analysis the project
1 parent 4b59cd6 commit 8ddeb52

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/cpp-build-test-coverage.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ jobs:
5858
--error-exitcode=1 \
5959
./src ./include
6060
61+
# -------------------------------------------------------
62+
# Step 2.1: Run Clang-Tidy (experimenting , not exit)
63+
# - Modern C++ static analysis
64+
# - Enforces best practices
65+
# - Add `--warnings-as-errors=*` to exit code 1
66+
# -------------------------------------------------------
67+
- name: Run clang-tidy
68+
run: |
69+
echo "Running clang-tidy..."
70+
clang-tidy \
71+
-checks='clang-analyzer-*,modernize-*,performance-*,readability-*' \
72+
-p build \
73+
$(find ./src -name '*.cpp')
74+
6175
# -------------------------------------------------------
6276
# Step 3: Configure and build the project
6377
# -------------------------------------------------------

0 commit comments

Comments
 (0)