lint: Require scripted-diff script to succeed (take 2) #35560

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2606-lint changing 1 files +7 −3
  1. maflcko commented at 9:52 AM on June 18, 2026: member

    Currently, scripted diffs may silently pass with errors.

    Fix this issue by calling the script from a Bash instance with error checking enabled: bash -o errexit -o nounset -o pipefail -c "$SCRIPT".

    Also, use Bash (not sh) when launching the script itself, because Bash is required anyway.

    Can be tested by running something like this and observing the behavior before and after:

    git commit --allow-empty -m $'scripted-diff: foo\n\n-BEGIN VERIFY SCRIPT-\n  false;falseasfsafsaf;true;false|cat; echo "${NO_UN_SET}"|cat  \n-END VERIFY SCRIPT-\n' && ./test/lint/commit-script-check.sh HEAD~..HEAD ; echo $?
    

    Alternatively, an ancient brittle script can be tested:

    ./test/lint/commit-script-check.sh fb65dde147f63422c4148b089c2f5be0bf5ba80f~..fb65dde147f63422c4148b089c2f5be0bf5ba80f
    
  2. lint: Require scripted-diff script to succeed fab2874269
  3. DrahtBot added the label Tests on Jun 18, 2026
  4. DrahtBot commented at 9:52 AM on June 18, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35560.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hodlinator, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. hodlinator approved
  6. hodlinator commented at 12:01 PM on June 18, 2026: contributor

    ACK fab2874269c865c9e8e2e347159fb17650efd83c

    This is a more complete version of #35547.

    My only nit is that the PR and commit message titles are copies of that earlier PR ("lint: Require scripted-diff script to succeed"). If you re-touch it would be nice to have both more distinct.

    Verified PR by using this scripted diff commit:

    scripted-diff: foo
    
    -BEGIN VERIFY SCRIPT-
      cat non_existent_file
      true
    -END VERIFY SCRIPT-
    
  7. maflcko renamed this:
    lint: Require scripted-diff script to succeed
    lint: Require scripted-diff script to succeed (take 2)
    on Jun 18, 2026
  8. maflcko commented at 12:23 PM on June 18, 2026: member

    Sure, added (take 2)

  9. fanquake added this to the milestone 32.0 on Jun 19, 2026
  10. sedited approved
  11. sedited commented at 1:40 PM on June 21, 2026: contributor

    ACK fab2874269c865c9e8e2e347159fb17650efd83c

  12. sedited merged this on Jun 21, 2026
  13. sedited closed this on Jun 21, 2026

  14. alexanderwiederin referenced this in commit b95c2a40c5 on Jun 24, 2026
  15. maflcko deleted the branch on Jun 25, 2026
Labels

Milestone
32.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-07-09 06:47 UTC