@@ -31,11 +31,14 @@ jobs:
3131 cmake -S . -B build \
3232 -DCMAKE_CXX_COMPILER=clang++ \
3333 -DCMAKE_C_COMPILER=clang \
34+ -DCMAKE_CXX_FLAGS="-Waddress" \
35+ -DCMAKE_C_FLAGS="-Waddress" \
3436 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
3537 -DCHECK_FOR_UPDATES=OFF \
3638 -DBUILD_EXAMPLES=ON \
3739 -DBUILD_TOOLS=ON \
38- -DCMAKE_BUILD_TYPE=Release
40+ -DENABLE_SECURITY_FLAGS=ON \
41+ -DCMAKE_BUILD_TYPE=Debug
3942
4043 - name : Build project
4144 run : cmake --build build -j$(nproc)
4750 -*,
4851 bugprone-string-compare,
4952 bugprone-suspicious-string-compare,
50- bugprone-string-literal-with-embedded-nul,
51- bugprone-compare-pointer-to-member-virtual-function,
52- bugprone-signed-char-misuse,
53- bugprone-bool-pointer-implicit-conversion,
5453 bugprone-argument-comment,
5554 bugprone-assert-side-effect,
5655 bugprone-branch-clone,
@@ -102,7 +101,7 @@ jobs:
102101 cert-msc50-cpp,
103102 cert-msc51-cpp,
104103 cert-oop58-cpp,
105- readability-string-compare ,
104+ clang-diagnostic-address ,
106105 readability-implicit-bool-conversion,
107106 modernize-use-nullptr,
108107 performance-inefficient-string-concatenation
@@ -114,6 +113,8 @@ jobs:
114113 value: 'false'
115114 - key: readability-implicit-bool-conversion.AllowPointerConditions
116115 value: 'false'
116+ - key: clang-diagnostic-address
117+ value: 'true'
117118 EOF
118119 echo "Created .clang-tidy configuration:"
119120 cat .clang-tidy
@@ -160,10 +161,11 @@ jobs:
160161 # === NEW: Extract errors only to a separate log ===
161162 - name : Extract errors from clang-tidy log
162163 run : |
163- # Extract actual clang-tidy errors, excluding:
164+ # Extract actual clang-tidy warnings/ errors, excluding:
164165 # - clang-diagnostic-* (compilation errors)
165166 # - "Error while processing" messages
166- grep -E 'error:' clang-tidy.log | \
167+ # Match format: /path/to/file.cpp:123:45: error: message [check-name]
168+ grep -E '^[^:]+:[0-9]+:[0-9]+: (error):' clang-tidy.log | \
167169 grep -v '\[clang-diagnostic' | \
168170 grep -v 'Error while processing' > clang-tidy-errors.log || true
169171
0 commit comments