Skip to content

Commit 8e95a9c

Browse files
committed
Merge bitcoin/bitcoin#29094: ci: Better tidy errors
fae70ba ci: Better tidy errors (MarcoFalke) Pull request description: Currently tidy errors are not nice, because the user may have to scroll up to see them in a large block of text. See for example (before) https://github.com/bitcoin/bitcoin/runs/19670551485 Fix that by `tee`ing the output to a file and summarizing the errors in the end again. See for example (after): https://github.com/bitcoin/bitcoin/runs/22647850662 ACKs for top commit: hebasto: ACK fae70ba, logs with errors look cleaner. TheCharlatan: ACK fae70ba Tree-SHA512: dcaea557fed40089409d16ce2cbaa8a9cfbf047f601d5daadfee0823b0eed7badc12d803addc0b7b6bb3f1eaf5c787fccb2488475d32c4efd80835f386f761dd
2 parents 9f2609d + fae70ba commit 8e95a9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ci/test/03_test_script.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ if [ "${RUN_TIDY}" = "true" ]; then
182182

183183
set -eo pipefail
184184
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
185-
( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" ) | grep -C5 "error"
185+
if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
186+
grep -C5 "error: " tmp.tidy-out.txt
187+
echo "^^^ ⚠️ Failure generated from clang-tidy"
188+
false
189+
fi
186190
# Filter out files by regex here, because regex may not be
187191
# accepted in src/.bear-tidy-config
188192
# Filter out:

0 commit comments

Comments
 (0)