Skip to content

Commit

Permalink
Merge bitcoin#29094: ci: Better tidy errors
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fanquake committed Mar 19, 2024
2 parents 9f2609d + fae70ba commit 8e95a9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/test/03_test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ if [ "${RUN_TIDY}" = "true" ]; then

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

0 comments on commit 8e95a9c

Please sign in to comment.