Add clippy to CI

Closes: #240
Approved by: dlrobertson
v0.7.x
Dan Robertson 2018-06-18 02:39:19 +00:00 committed by Homu
parent b23df24a2a
commit eb078ecf63
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,8 @@ matrix:
MODE='build'
- rust: nightly
env: MODE='fuzz run' ARGS='packet_parser -- -max_len=1536 -max_total_time=30'
- rust: nightly
env: FEATURES='default' MODE='clippy'
allow_failures:
# something's screwy with Travis (as usual) and cargo-fuzz dies with a LeakSanitizer error
# even when it's successful. Keep this in .travis.yml in case it starts working some day.
@ -44,6 +46,7 @@ matrix:
env: MODE='fuzz run' ARGS='packet_parser -- -max_len=1536 -max_total_time=30'
before_script:
- if [ "$MODE" == "fuzz run" ]; then cargo install cargo-fuzz; fi
- if [ "$MODE" == "clippy" ]; then cargo install clippy; fi
script:
- cargo $MODE --no-default-features --features "$FEATURES" $ARGS
notifications:

View File

@ -88,6 +88,9 @@
feature = "socket-tcp")))]
compile_error!("at least one socket needs to be enabled"); */
// FIXME(dlrobertson): clippy fails with this lint
#![cfg_attr(feature = "cargo-clippy", allow(if_same_then_else))]
#[cfg(feature = "proto-ipv6")]
#[macro_use]
extern crate bitflags;