chrono/ci/lint.sh
Brandon W Maister c788a4495b 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`
2020-06-27 17:10:38 -04:00

17 lines
412 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=ci/_shlib.sh
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
}
main