File tree 4 files changed +17
-1
lines changed
4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ script:
22
22
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose; fi
23
23
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning; fi
24
24
- 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
25
29
# Test the appropriate workspace(s)
26
30
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose; fi
27
31
- 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,18 @@ Coding Conventions
77
77
Use tabs. If you want to align lines, use spaces. Any desired alignment should
78
78
display fine at any tab-length display setting.
79
79
80
+ Our CI enforces [ clippy's] ( https://github.com/rust-lang/rust-clippy ) default linting
81
+ [ settings] ( https://rust-lang.github.io/rust-clippy/rust-1.39.0/index.html ) .
82
+ This includes all lint groups except for nursery, pedantic, and cargo in addition to allowing the following lints:
83
+ ` erasing_op ` , ` never_loop ` , ` if_same_then_else ` .
84
+
85
+ If you use rustup, feel free to lint locally, otherwise you can just push to CI for automated linting.
86
+
87
+ ``` bash
88
+ rustup component add clippy
89
+ cargo clippy
90
+ ```
91
+
80
92
Security
81
93
--------
82
94
Original file line number Diff line number Diff line change @@ -36,4 +36,3 @@ pub mod util;
36
36
pub mod chain;
37
37
pub mod ln;
38
38
pub mod routing;
39
-
Original file line number Diff line number Diff line change 16
16
//! It does not manage routing logic (see routing::router::get_route for that) nor does it manage constructing
17
17
//! on-chain transactions (it only monitors the chain to watch for any force-closes that might
18
18
//! imply it needs to fail HTLCs/payments/channels it manages).
19
+ //!
19
20
20
21
use bitcoin:: blockdata:: block:: BlockHeader ;
21
22
use bitcoin:: blockdata:: constants:: genesis_block;
You can’t perform that action at this time.
0 commit comments