File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff 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 -- -Aclippy::erasing_op -Aclippy::never_loop -Aclippy::if_same_then_else; 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
Original file line number Diff line number Diff line change @@ -77,6 +77,17 @@ Coding Conventions
7777Use tabs. If you want to align lines, use spaces. Any desired alignment should
7878display fine at any tab-length display setting.
7979
80+ Please lint your code using [ clippy] ( https://github.com/rust-lang/rust-clippy ) .
81+
82+ ``` bash
83+ rustup component add clippy
84+ cargo clippy
85+ ```
86+
87+ We use the [ default linting settings] ( https://rust-lang.github.io/rust-clippy/rust-1.39.0/index.html ) , which includes all lint
88+ groups except for nursery, pedantic, and cargo. Our CI will use these default settings in addition to allowing the
89+ following lints: ` erasing_op ` , ` never_loop ` , ` if_same_then_else ` .
90+
8091Security
8192--------
8293
Original file line number Diff line number Diff line change @@ -36,4 +36,3 @@ pub mod util;
3636pub mod chain;
3737pub mod ln;
3838pub mod routing;
39-
Original file line number Diff line number Diff line change 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+ //!
1920
2021use bitcoin:: blockdata:: block:: BlockHeader ;
2122use bitcoin:: blockdata:: constants:: genesis_block;
You can’t perform that action at this time.
0 commit comments