Skip to content

Commit 0c950e4

Browse files
committed
add clippy to travis integration
1 parent 1276cc7 commit 0c950e4

File tree

6 files changed

+10
-1
lines changed

6 files changed

+10
-1
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ script:
2222
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose; fi
2323
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning; fi
2424
- rm -f target/debug/lightning-* # Make sure we drop old test binaries
25+
# Run clippy on Rust 1.39.0
26+
- if [ "$(rustup show | grep default | grep 1.39.0)" != "" ]; then
27+
rustup component add clippy &&
28+
cargo clippy; fi
2529
# Test the appropriate workspace(s)
2630
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose; fi
2731
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose -p lightning; fi

lightning/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ pub mod util;
3636
pub mod chain;
3737
pub mod ln;
3838
pub mod routing;
39-

lightning/src/ln/channel.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
77
// You may not use this file except in accordance with one or both of these
88
// licenses.
9+
#![allow(clippy::erasing_op)]
910

1011
use bitcoin::blockdata::block::BlockHeader;
1112
use bitcoin::blockdata::script::{Script,Builder};

lightning/src/ln/channelmanager.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
//! It does not manage routing logic (see routing::router::get_route for that) nor does it manage constructing
1717
//! on-chain transactions (it only monitors the chain to watch for any force-closes that might
1818
//! imply it needs to fail HTLCs/payments/channels it manages).
19+
//!
20+
#![allow(clippy::never_loop)]
1921

2022
use bitcoin::blockdata::block::BlockHeader;
2123
use bitcoin::blockdata::constants::genesis_block;

lightning/src/routing/network_graph.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
//! The top-level network map tracking logic lives here.
1111
12+
#![allow(clippy::if_same_then_else)]
13+
1214
use bitcoin::secp256k1::key::PublicKey;
1315
use bitcoin::secp256k1::Secp256k1;
1416
use bitcoin::secp256k1;

lightning/src/util/byte_utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
77
// You may not use this file except in accordance with one or both of these
88
// licenses.
9+
#![allow(clippy::erasing_op)]
910

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

0 commit comments

Comments
 (0)