Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Better tidy errors #29094

Merged
merged 1 commit into from
Mar 19, 2024
Merged

ci: Better tidy errors #29094

merged 1 commit into from
Mar 19, 2024

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Dec 15, 2023

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 teeing the output to a file and summarizing the errors in the end again. See for example (after): https://github.com/bitcoin/bitcoin/runs/22647850662

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 15, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto, TheCharlatan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot changed the title ci: Better tidy errors ci: Better tidy errors Dec 15, 2023
@DrahtBot
Copy link
Contributor

🤔 There hasn't been much activity lately and the CI seems to be failing.

If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.

@maflcko maflcko marked this pull request as ready for review March 14, 2024 08:38
@maflcko
Copy link
Member Author

maflcko commented Mar 14, 2024

Fixed the bash logic, rebased, and updated OP

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fae70ba, logs with errors look cleaner.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use grep -B 1 -A 5 instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will always be a guess at the context. I think longer error messages than 5 lines are possible, so if someone needs the full context, they'll have to scroll up either way.

@maflcko
Copy link
Member Author

maflcko commented Mar 19, 2024

rfm? Or does it need more ACKs, or does it need something else?

Copy link
Contributor

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fae70ba

@fanquake fanquake merged commit 8e95a9c into bitcoin:master Mar 19, 2024
16 checks passed
@maflcko maflcko deleted the 2312-ci-tidy-nice- branch March 19, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants