Skip to content

Run clippy on Travis-CI #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions dist/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set -e

# Helpful context.

echo "TRAVIS_ALLOW_FAILURE: $TRAVIS_ALLOW_FAILURE"
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
echo "TRAVIS_BUILD_ID: $TRAVIS_BUILD_ID"
echo "TRAVIS_COMMIT: $TRAVIS_COMMIT"
Expand Down Expand Up @@ -136,17 +137,17 @@ elif [[ "$TRAVIS_OS_NAME" == linux ]] ; then
fi
fi

rustup component add rustfmt

travis_end_fold pre_build

# Check that the code is properly rustfmt'd.
# Check that the code is properly rustfmt'd and clippy'd.

travis_start_fold check_rustfmt "Maybe check rustfmt? ($is_main_build)"
travis_start_fold check_rustfmt_clippy "Maybe rustfmt and clippy? ($is_main_build)"
if $is_main_build ; then
rustup component add rustfmt clippy
cargo fmt --all -- --check
cargo clippy --all --all-targets --all-features -- --deny warnings
fi
travis_end_fold check_rustfmt
travis_end_fold check_rustfmt_clippy

# OK, the biggie: does it compile and pass the test suite?

Expand Down