summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml15
-rw-r--r--rustfmt.toml1
-rw-r--r--src/main.rs2
3 files changed, 17 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 8c91a74..df70939 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,20 @@ language: rust
rust:
- stable
- beta
- - nightly
+before_script:
+ - rustup component add rustfmt clippy
+script:
+ - set -e # Abort on failure, see https://github.com/travis-ci/travis-ci/issues/1066
+ - cargo fmt -- --check
+ - cargo build --verbose
+ - cargo test --verbose
+ - cargo clippy --all-targets --all-features -- -D warnings
matrix:
+ include:
+ - rust: nightly
+ before_script:
+ - rustup component add rustfmt
+ # Fallback to git in case clippy is not available in the current nightly
+ - rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
allow_failures:
- rust: nightly
diff --git a/rustfmt.toml b/rustfmt.toml
new file mode 100644
index 0000000..32a9786
--- /dev/null
+++ b/rustfmt.toml
@@ -0,0 +1 @@
+edition = "2018"
diff --git a/src/main.rs b/src/main.rs
index d499432..b4d46cf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,5 @@
+#![deny(clippy::all)]
+
mod display;
mod network;
mod os;