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:
14
cranelift/src/format-all.sh
Executable file
14
cranelift/src/format-all.sh
Executable 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
|
||||||
Reference in New Issue
Block a user