Add a script for reformatting all sources.

This is mostly useful when updating to a new version of rustfmt with different
behavior.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-01 14:32:04 -07:00
parent 320d5b369a
commit ab35a6e596

14
cranelift/src/format-all.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Format all sources using rustfmt.
# Exit immediately on errors.
set -e
cd $(dirname "$0")
src=$(pwd)
for crate in $(find "$src" -name Cargo.toml); do
cd $(dirname "$crate")
cargo fmt
done