diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-12-10 14:38:14 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-10 14:38:14 +0000 |
| commit | 7a7aceda729d35a1a0a05d1c4b56e9ec27e4b218 (patch) | |
| tree | 2598a917b4f74629be4ce352ca5f0a44a34479d4 | |
| parent | e932dc131e94f30db32b3fc9fbce8cd929555820 (diff) | |
| parent | 8ef329e5cf1ce4d7a3ff6b6bec1551a0ae6d3e8b (diff) | |
Merge pull request #5026 from jamesmunns/james/add-fmt-script
Add a basic "format all" script
| -rwxr-xr-x | fmtall.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fmtall.sh b/fmtall.sh new file mode 100755 index 000000000..9cadcdbe9 --- /dev/null +++ b/fmtall.sh | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | set -euo pipefail | ||
| 4 | |||
| 5 | # We need the nightly toolchain for this | ||
| 6 | mv rust-toolchain-nightly.toml rust-toolchain.toml | ||
| 7 | |||
| 8 | # Similar to the CI workflow, but don't just CHECK, actualy DO the formatting | ||
| 9 | find . -name '*.rs' -not -path '*target*' | xargs rustfmt --skip-children --unstable-features --edition 2024 | ||
| 10 | |||
| 11 | # Put the toolchains back, copy back to nightly and do a clean checkout of rust-toolchain | ||
| 12 | mv rust-toolchain.toml rust-toolchain-nightly.toml | ||
| 13 | git checkout -- rust-toolchain.toml | ||
