From c788a4495b5bde050d1e4a52e5b4a53d56c51058 Mon Sep 17 00:00:00 2001 From: Brandon W Maister Date: Sat, 27 Jun 2020 17:10:38 -0400 Subject: [PATCH] Add a lint for cargo fmt This also adds the cargo fmt commit to the (new) .git-ignore-revs file which can cause it to not show up in `git blame` either with `--ignore-revs-file` or `git config blame.ignoreRevsFile .git-ignore-revs` --- .git-ignore-revs | 1 + ci/lint.sh | 1 + 2 files changed, 2 insertions(+) create mode 100644 .git-ignore-revs diff --git a/.git-ignore-revs b/.git-ignore-revs new file mode 100644 index 00000000..5d83f4f1 --- /dev/null +++ b/.git-ignore-revs @@ -0,0 +1 @@ +febb8dc168325ac471b54591c925c48b6a485962 # cargo fmt diff --git a/ci/lint.sh b/ci/lint.sh index 53026dfc..bde0392b 100755 --- a/ci/lint.sh +++ b/ci/lint.sh @@ -8,6 +8,7 @@ source "${BASH_SOURCE[0]%/*}/_shlib.sh" main() { # rustflags are present because of: https://github.com/rust-lang/rust-clippy/issues/5749 runt env RUSTFLAGS="-Dwarnings" cargo clippy --color=always -- -D warnings + runt cargo fmt -- --check --color=always runt make readme runv git diff --exit-code -- README.md }