diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-11-22 08:31:02 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-11-22 08:31:02 +0200 |
commit | 0493559145e5a6632ea605cb71662a36ec727259 (patch) | |
tree | ed39dc98fb517153b83e15fd6f5a0270d6eb9753 /check | |
parent | aafde793b3d88388364de043a7cece4ce4308006 (diff) | |
download | obnam2-0493559145e5a6632ea605cb71662a36ec727259.tar.gz |
fix: run cargo clippy, fmt only if available
Diffstat (limited to 'check')
-rwxr-xr-x | check | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -16,9 +16,14 @@ then esac fi +got_cargo_cmd() +{ + cargo --list | grep " $1 " > /dev/null +} + cargo build --all-targets $quiet -cargo clippy $quiet -cargo fmt -- --check +got_cargo_cmd clippy && cargo clippy $quiet +got_cargo_cmd fmt && cargo fmt -- --check $hideok cargo test $quiet sp-docgen obnam.md -o obnam.html |