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

Commit 656fa15

Browse files
committed
Add clippy to Travis CI
1 parent bfa2ec1 commit 656fa15

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-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

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
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 component add --toolchain nightly rustfmt-preview
7+
which rustfmt || cargo install --force rustfmt-nightly
8+
cargo +nightly fmt -- --version
9+
;;
10+
clippy)
11+
echo "Installing clippy..."
12+
rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
13+
;;
14+
esac

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ matrix:
1111
- name: "Rust: format"
1212
env: ACTION=format
1313
rust: nightly
14+
- name: "Rust: clippy"
15+
env: ACTION=clippy
16+
rust: nightly
1417
- name: "Rust: doc"
1518
env: ACTION=doc
1619
rust: stable

0 commit comments

Comments
 (0)