Skip to content
This repository was archived by the owner on Oct 14, 2021. It is now read-only.

Commit 060bbf6

Browse files
committed
Add clippy to Travis CI
1 parent bfa2ec1 commit 060bbf6

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.ci/build.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ case "$1" in
1111
doc)
1212
cargo doc --all
1313
;;
14-
esac
14+
clippy)
15+
cargo clippy --all-targets --all-features -- -D warnings
16+
;;
17+
esac

.ci/setup.sh

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#!/bin/bash
22

3-
if [ "$1" == "format" ]; then
4-
echo "Installing rustfmt..."
5-
rustup toolchain install nightly
6-
rustup component add --toolchain nightly rustfmt-preview
7-
which rustfmt || cargo install --force rustfmt-nightly
8-
cargo +nightly fmt -- --version
9-
fi
3+
case "$1" in
4+
format)
5+
echo "Installing rustfmt..."
6+
rustup toolchain install nightly
7+
rustup component add --toolchain nightly rustfmt-preview
8+
which rustfmt || cargo install --force rustfmt-nightly
9+
cargo +nightly fmt -- --version
10+
;;
11+
clippy)
12+
echo "Installing clippy..."
13+
rustup toolchain install nightly
14+
rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
15+
;;
16+
esac

0 commit comments

Comments
 (0)