2016-04-22 07:19:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Make sure you double check the diffs after running this script - with great
|
|
|
|
# power comes great responsibility.
|
|
|
|
# We deliberately avoid reformatting files with rustfmt comment directives.
|
|
|
|
|
2017-03-27 22:20:11 +00:00
|
|
|
cargo build --release
|
2016-04-22 07:19:09 +00:00
|
|
|
|
2017-03-27 22:20:11 +00:00
|
|
|
target/release/rustfmt --write-mode=overwrite src/lib.rs
|
2018-03-12 04:24:04 +00:00
|
|
|
target/release/rustfmt --write-mode=overwrite src/bin/main.rs
|
|
|
|
target/release/rustfmt --write-mode=overwrite src/cargo-fmt/main.rs
|
2016-04-22 07:19:09 +00:00
|
|
|
|
|
|
|
for filename in tests/target/*.rs; do
|
|
|
|
if ! grep -q "rustfmt-" "$filename"; then
|
2017-03-27 22:20:11 +00:00
|
|
|
target/release/rustfmt --write-mode=overwrite $filename
|
2016-04-22 07:19:09 +00:00
|
|
|
fi
|
|
|
|
done
|