Skip to content

Commit 08e80fc

Browse files
committed
Implemented pass/fail check in CI.
1 parent 146a324 commit 08e80fc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/iwyu.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
- name: count warnings
6464
run: |
6565
cd build
66-
COUNT=`grep -c "Warning:" iwyu.log`
67-
echo "include-what-you-use reported ${COUNT} warning(s)"
68-
66+
export WARNING_COUNT=`grep -c "include-what-you-use reported diagnostics:" iwyu.log`
67+
echo "include-what-you-use reported ${WARNING_COUNT} warning(s)"
68+
# Acceptable limit, to decrease over time down to 0
69+
export WARNING_LIMIT=10
70+
# FAIL the build if WARNING_COUNT >= WARNING_LIMIT
71+
exit $(( WARNING_COUNT >= WARNING_LIMIT ? 1 : 0 ))

0 commit comments

Comments
 (0)