Skip to content

Commit

Permalink
Add clippy to CI
Browse files Browse the repository at this point in the history
Closes: #240
Approved by: dlrobertson
  • Loading branch information
dlrobertson authored and Homu committed Jun 19, 2018
1 parent 7699265 commit bf24933
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -37,13 +37,16 @@ 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.
- rust: nightly
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:
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Expand Up @@ -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;
Expand Down

0 comments on commit bf24933

Please sign in to comment.