Skip to content

Commit 6133c62

Browse files
committed
Fix clang-tidy wrapper to only fail on errors
1 parent d318601 commit 6133c62

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tools/static-analysis/clang-tidy-builder.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ if [[ -n "${CLANG_TIDY+x}" ]]; then
216216
*)
217217

218218
echo "$clang_tidy_line" >&2
219-
retval=1
219+
if [[ "$clang_tidy_line" =~ :[[:space:]]error: ]]; then
220+
retval=1
221+
fi
220222
;;
221223

222224
esac

tools/static-analysis/run_clang_tidy_make.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ echo ""
155155
echo "Processing results..."
156156

157157
# Extract errors and warnings (excluding notes)
158+
rm -f "$OUTPUT_DIR/clang_tidy_summary.txt"
158159
grep -E "^[^:]+\.(c|h):[0-9]+:[0-9]+: (error|warning):" "$OUTPUT_DIR/clang_tidy_output.txt" > "$OUTPUT_DIR/clang_tidy_summary.txt" 2>/dev/null || true
159160

160161
# Count issues

0 commit comments

Comments
 (0)