From 8ef329e5cf1ce4d7a3ff6b6bec1551a0ae6d3e8b Mon Sep 17 00:00:00 2001 From: James Munns Date: Wed, 10 Dec 2025 15:32:11 +0100 Subject: Add a basic "format all" script --- fmtall.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 fmtall.sh (limited to 'fmtall.sh') diff --git a/fmtall.sh b/fmtall.sh new file mode 100755 index 000000000..9cadcdbe9 --- /dev/null +++ b/fmtall.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -euo pipefail + +# We need the nightly toolchain for this +mv rust-toolchain-nightly.toml rust-toolchain.toml + +# Similar to the CI workflow, but don't just CHECK, actualy DO the formatting +find . -name '*.rs' -not -path '*target*' | xargs rustfmt --skip-children --unstable-features --edition 2024 + +# Put the toolchains back, copy back to nightly and do a clean checkout of rust-toolchain +mv rust-toolchain.toml rust-toolchain-nightly.toml +git checkout -- rust-toolchain.toml -- cgit