Skip to content

Commit

Permalink
add clippy to travis integration
Browse files Browse the repository at this point in the history
  • Loading branch information
rloomba committed Oct 7, 2020
1 parent 1276cc7 commit 0c950e4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ script:
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose; fi
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning; fi
- rm -f target/debug/lightning-* # Make sure we drop old test binaries
# Run clippy on Rust 1.39.0
- if [ "$(rustup show | grep default | grep 1.39.0)" != "" ]; then
rustup component add clippy &&
cargo clippy; fi
# Test the appropriate workspace(s)
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose; fi
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose -p lightning; fi
Expand Down
1 change: 0 additions & 1 deletion lightning/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ pub mod util;
pub mod chain;
pub mod ln;
pub mod routing;

1 change: 1 addition & 0 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// You may not use this file except in accordance with one or both of these
// licenses.
#![allow(clippy::erasing_op)]

use bitcoin::blockdata::block::BlockHeader;
use bitcoin::blockdata::script::{Script,Builder};
Expand Down
2 changes: 2 additions & 0 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
//! It does not manage routing logic (see routing::router::get_route for that) nor does it manage constructing
//! on-chain transactions (it only monitors the chain to watch for any force-closes that might
//! imply it needs to fail HTLCs/payments/channels it manages).
//!
#![allow(clippy::never_loop)]

use bitcoin::blockdata::block::BlockHeader;
use bitcoin::blockdata::constants::genesis_block;
Expand Down
2 changes: 2 additions & 0 deletions lightning/src/routing/network_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

//! The top-level network map tracking logic lives here.
#![allow(clippy::if_same_then_else)]

use bitcoin::secp256k1::key::PublicKey;
use bitcoin::secp256k1::Secp256k1;
use bitcoin::secp256k1;
Expand Down
1 change: 1 addition & 0 deletions lightning/src/util/byte_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// You may not use this file except in accordance with one or both of these
// licenses.
#![allow(clippy::erasing_op)]

#[inline]
pub fn slice_to_be16(v: &[u8]) -> u16 {
Expand Down

0 comments on commit 0c950e4

Please sign in to comment.