From 18ce5713e6cb99c40aafec52b67c28ba12a44f31 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 19 Feb 2019 17:08:53 -0800 Subject: bin: Add script to run rustfmt against all workspaces Add a script to run `cargo fmt` on all Rust code contained in crosvm. This is different from `cargo fmt --all` which formats multiple crates but a single workspace only. Crosvm consists of multiple workspaces. Usage: $ bin/fmt To print a diff and exit 1 if code is not formatted, but without changing any files, use: $ bin/fmt --check TEST=those commands TEST=local kokoro Change-Id: I4194509ad3a1bbc829c4b1069d54d940b927113b Reviewed-on: https://chromium-review.googlesource.com/1477498 Commit-Ready: David Tolnay Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: Zach Reizner --- kokoro/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kokoro') diff --git a/kokoro/Dockerfile b/kokoro/Dockerfile index 68a910f..cc0d952 100644 --- a/kokoro/Dockerfile +++ b/kokoro/Dockerfile @@ -131,4 +131,4 @@ CMD rustup default "$(cat rust-toolchain)" && \ cargo test --no-fail-fast --all-features --all --exclude aarch64 $TEST_FLAGS -- \ --test-threads=1 $TEST_RUNNER_FLAGS && \ echo "Running cargo fmt" && \ - cargo fmt --all -- --check + bin/fmt --check -- cgit 1.4.1