sudo: false
language: rust
rust:
  - '1.22.1' # base line for backwards compatibility
  - stable # to stay up to date
  - beta # because the Rust team appreciates it
  - nightly
script:
  - cargo build --verbose
  - cargo test --verbose
cache: cargo
# Check formatting before running tests
stages:
  - formatting
  - test
jobs:
  include:
    # Add an additional stage to check formatting
    - stage: formatting
      before_install: rustup component add rustfmt-preview
      script: cargo fmt -- --write-mode=diff
      rust: stable

sudo: false
language: rust
rust:
  - '1.22.1' # base line for backwards compatibility
  - stable # to stay up to date
  - beta # because the Rust team appreciates it
  - nightly
script:
  - cargo build --verbose
  - cargo test --verbose
cache: cargo
# Check formatting before running tests
stages:
  - formatting
  - test
  - lint
jobs:
  include:
    # Add an additional stage to check formatting
    - stage: formatting
      before_install: rustup component add rustfmt-preview
      script: cargo fmt -- --write-mode=diff
      rust: stable
    - stage: lint
      before_install: cargo install --force clippy
      script: cargo clippy
      rust: nightly

Add clippy to Travis CI
Add clippy to Travis CI
