-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add clippy to Travis integration #739
Add clippy to Travis integration #739
Conversation
Codecov Report
@@ Coverage Diff @@
## main #739 +/- ##
==========================================
+ Coverage 91.94% 91.98% +0.04%
==========================================
Files 37 37
Lines 20108 20108
==========================================
+ Hits 18488 18497 +9
+ Misses 1620 1611 -9
Continue to review full report at Codecov.
|
Cool. Probably worth at least turning on whatever subset already passes instead of just one lint, and definitely add let_underscore_lock, given that was the actual bug for us. |
858ab6f
to
0c950e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise ACK 0c950e4
0c950e4
to
67a7f20
Compare
It looks like unfortunately 1.30.0 doesn't support scoped lints, more at rust-lang/rust#44690:
So if we ever move the MSRV to 1.31.0 or higher, we'll be able to specify lints within individual libs. But for now, we'll only run the lint on 1.39.0 with the default linter + add allows for |
I dont think our MSRV needs to extend to clippy - in general test and other infrastructure which isn't required for users I don't think needs to observe MSRV at all. |
CONTRIBUTING.md
Outdated
@@ -77,6 +77,17 @@ Coding Conventions | |||
Use tabs. If you want to align lines, use spaces. Any desired alignment should | |||
display fine at any tab-length display setting. | |||
|
|||
Please lint your code using [clippy](https://github.com/rust-lang/rust-clippy). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "Note that our CI enforces a few basic clippy
lints - you can test locally if you use rustup, or just push to CI to test." or something like that, given that clippy is only available via rustup and we dont want to encourge people to use rustup when they otherwise wouldn't (as a few other things we use break, eg the bindings generation link-time-LTO, which is way more important than clippy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thanks for the context!
Totally agree. I think if we ever want to support the broader Rust feature of scoped attributes for white-listed tools, e.g., |
67a7f20
to
426c5b2
Compare
Ah, OK, I misunderstood the conversation sorry. |
Can you add the lint run to github CI as well? We'll probably remove travis soon, I think. Otherwise, ACK! |
Inspired by #724. This PR fixes 37 warnings caused by using redundant fields and adds clippy integration to Travis to error out if a redundant field is detected. Hopefully we can slowly fix warnings/errors and add those fixed lints to the list of denies or as @casey mentioned, disable specific lints using #![allow(clippy::LINT)] in modules/crates/functions.
Does it make sense to specify clippy to run on 1.30.0 for lightning and 1.39.0 for lightning-net-tokio?