Skip to content

Commit 6cb4e29

Browse files
committed
Remove _all_ the trailing whitespace
Recently we tried to make the rustfmt bot remove trailing whitespace but wrote the `sed` command incorrectly - it only removes a single character. Tested by running the new command on rust-bitcoin#4600.
1 parent a1be2fd commit 6cb4e29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/cron-weekly-rustfmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
components: rustfmt
1515
- name: Run Nightly rustfmt
1616
# Run the formatter and manually remove trailing whitespace.
17-
run: cargo +nightly fmt && find . -type f -name '*.rs' -exec sed -i 's/ $//' {} \;
17+
run: cargo +nightly fmt && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//'
1818
- name: Get the current date
1919
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
2020
- name: Create Pull Request

0 commit comments

Comments
 (0)