diff options
author | toofar <toofar@spalge.com> | 2023-01-03 17:15:54 +1300 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2023-01-03 19:12:07 +1300 |
commit | 355da9a44e4da7ec3a16613d6375234720e34df6 (patch) | |
tree | ff209beb2599bd8883e4f174db5cec15465dcf19 | |
parent | 507e678de8ae78a5365f66bfc03c9d5f995c0271 (diff) | |
download | qutebrowser-355da9a44e4da7ec3a16613d6375234720e34df6.tar.gz qutebrowser-355da9a44e4da7ec3a16613d6375234720e34df6.zip |
Run formatter tools twice
Pyupgrade and black were fighting, which made this difficult to pin
down. #4578 was a good test case.
This makes it a bit slow now, of course.
-rwxr-xr-x | scripts/check_mergability.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/check_mergability.sh b/scripts/check_mergability.sh index 69bf85875..5d4e6a6fa 100755 --- a/scripts/check_mergability.sh +++ b/scripts/check_mergability.sh @@ -249,6 +249,19 @@ rebase_with_formatting () { $cmd qutebrowser tests git commit -am "dropme! $cmd" # mark commits for dropping when we rebase onto the more recent master done + # Occasionally we get situations where black and pyupgrade build on each + # other to enable further changes. So the order you run them matters. But we + # have situations where each one enables the other, in both orders. So we + # run them all yet again to pick up any lingering changes from the first + # run. + # If we don't do this the leftover changes can be picked up by the smudge + # filter during the first rebase below and added to "fix lint" commits. Then + # since they don't have "dropme!" in the messages they stick in the branch + # and end up conflicting with the base branch. + echo "$cmds" | tr ' ' '\n' | while read cmd; do + $cmd qutebrowser tests + git commit -am "dropme! $cmd 2" + done git checkout -b ${prefix}pr/$number pr/$number @@ -427,6 +440,15 @@ else $cmd qutebrowser tests git commit -am "$cmd" done + # Occasionally we get situations where black and pyupgrade build on each + # other to enable further changes. So the order you run them matters. But we + # have situations where each one enables the other, in both orders. So we + # run them all yet again to pick up any lingering changes from the first + # run. + echo "$cmds" | tr ' ' '\n' | while read cmd; do + $cmd qutebrowser tests + git commit -am "$cmd second run" + done generate_report "$branch" y "$strategy" "$cmds" "$pull_request" done fi |