-
Notifications
You must be signed in to change notification settings - Fork 412
Added clippy ignore rules for all errors and warnings #3238
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3238 +/- ##
==========================================
- Coverage 89.82% 89.80% -0.02%
==========================================
Files 126 126
Lines 103024 103020 -4
Branches 103024 103020 -4
==========================================
- Hits 92543 92519 -24
- Misses 7769 7776 +7
- Partials 2712 2725 +13 ☔ View full report in Codecov by Sentry. |
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.
Thanks, are there any of these that we're only hitting one or five times that we should just go ahead and fix immediately rather than allowing first?
Here is a small sample of lints that seems to be low hanging fruit and can possibly be fixed in this PR:
A commit per lint fix would be a nice separation of concerns but combining a few small ones in a single commit should also be ok :) |
6d07e0a
to
4dad726
Compare
I addressed all comments above. Ready for another review. |
4dad726
to
6ff1978
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.
LGTM overall, just a though is if we need to have some sort of githook now to run what the CI is running.
I think it is a waste of CI cycles just pushing the code and find out that there is some warning to be fixed
There are no custom githooks at the moment, so that would be a whole other discussion on what would/wouldn't belong there. I'd recommend opening a separate issue. |
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.
Thanks! I think it's okay to tackle the rest in some follow-up PRs. I'm sure there are many easy wins still remaining out of these allowed warnings but I haven't checked.
@@ -2049,7 +2050,7 @@ impl MaybeReadable for Event { | |||
payment_hash, | |||
purpose: _init_tlv_based_struct_field!(purpose, upgradable_required), | |||
amount_msat, | |||
htlcs: htlcs.unwrap_or(vec![]), | |||
htlcs: htlcs.unwrap_or_default(), |
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.
I generally find the use of default
strictly less readable than explicit Vec::new
(which is ~free, though we can always do unwrap_or_else(Vec::new) to avoid the call), but for now its fine.
As mentioned #3223 (comment) and #3223 (comment), this PR adds a list of ignored(allowed) clippy errors and warnings to the CI checks.