Skip to content

Fix lint errors #3441

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

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Fix lint errors #3441

merged 3 commits into from
Dec 5, 2024

Conversation

arik-so
Copy link
Contributor

@arik-so arik-so commented Dec 5, 2024

CI is currently complaining about lint issues we cannot address without raising our MSRV, so this PR adds some exemptions.

@arik-so arik-so force-pushed the 2024-12-lint-fixes branch from b0a3ac2 to 9fefdbb Compare December 5, 2024 00:58
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.69%. Comparing base (726dd5c) to head (9fefdbb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3441   +/-   ##
=======================================
  Coverage   89.69%   89.69%           
=======================================
  Files         130      130           
  Lines      107335   107335           
  Branches   107335   107335           
=======================================
  Hits        96273    96273           
+ Misses       8660     8659    -1     
- Partials     2402     2403    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arik-so arik-so requested a review from tnull December 5, 2024 06:30
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to squash the fixup.

Feel free to address the nit while squashing, or ignore it.

@arik-so arik-so force-pushed the 2024-12-lint-fixes branch from 9fefdbb to d8bb590 Compare December 5, 2024 08:44
@arik-so arik-so force-pushed the 2024-12-lint-fixes branch from d8bb590 to b4f21d1 Compare December 5, 2024 08:48
@tnull
Copy link
Contributor

tnull commented Dec 5, 2024

Changes are trivial and give us that green checkmark. Merging.

@tnull tnull merged commit 797993c into lightningdevkit:main Dec 5, 2024
19 checks passed
@tnull
Copy link
Contributor

tnull commented Dec 5, 2024

@arik-so Did you have luck running check-lint.sh locally?

I currently get:

> ./ci/check-lint.sh
+ RUSTFLAGS='-D warnings'
+ cargo clippy -- -A clippy::unwrap-or-default -A clippy::erasing_op -A clippy::never_loop -A renamed_and_removed_lints -A clippy::blocks_in_conditions -A clippy::borrow_deref_ref -A clippy::clone_on_copy -A clippy::collapsible_else_if -A clippy::collapsible_if -A clippy::collapsible_match -A clippy::comparison_chain -A clippy::doc_lazy_continuation -A clippy::drain_collect -A clippy::drop_non_drop -A clippy::enum_variant_names -A clippy::explicit_auto_deref -A clippy::extra_unused_lifetimes -A clippy::for_kv_map -A clippy::from_over_into -A clippy::get_first -A clippy::identity_op -A clippy::if_same_then_else -A clippy::inconsistent_digit_grouping -A clippy::iter_kv_map -A clippy::iter_skip_next -A clippy::large_enum_variant -A clippy::legacy_numeric_constants -A clippy::len_without_is_empty -A clippy::len_zero -A clippy::let_and_return -A clippy::manual_div_ceil -A clippy::manual_filter -A clippy::manual_map -A clippy::manual_memcpy -A clippy::manual_inspect -A clippy::manual_range_contains -A clippy::manual_range_patterns -A clippy::manual_saturating_arithmetic -A clippy::manual_strip -A clippy::map_clone -A clippy::map_flatten -A clippy::match_like_matches_macro -A clippy::match_ref_pats -A clippy::multiple_bound_locations -A clippy::mut_mutex_lock -A clippy::needless_bool -A clippy::needless_borrow -A clippy::needless_borrowed_reference -A clippy::needless_borrows_for_generic_args -A clippy::needless_lifetimes -A clippy::needless_question_mark -A clippy::needless_range_loop -A clippy::needless_return -A clippy::new_without_default -A clippy::non_minimal_cfg -A clippy::op_ref -A clippy::option_as_ref_deref -A clippy::option_map_or_none -A clippy::option_map_unit_fn -A clippy::precedence -A clippy::ptr_arg -A clippy::question_mark -A clippy::readonly_write_lock -A clippy::redundant_closure -A clippy::redundant_field_names -A clippy::redundant_guards -A clippy::redundant_pattern_matching -A clippy::redundant_slicing -A clippy::redundant_static_lifetimes -A clippy::result_large_err -A clippy::result_unit_err -A clippy::search_is_some -A clippy::single_char_pattern -A clippy::single_match -A clippy::slow_vector_initialization -A clippy::tabs_in_doc_comments -A clippy::to_string_in_format_args -A clippy::too_many_arguments -A clippy::toplevel_ref_arg -A clippy::type_complexity -A clippy::unnecessary_cast -A clippy::unnecessary_get_then_check -A clippy::unnecessary_lazy_evaluations -A clippy::unnecessary_mut_passed -A clippy::unnecessary_sort_by -A clippy::unnecessary_to_owned -A clippy::unnecessary_unwrap -A clippy::unused_unit -A clippy::useless_conversion
    Checking secp256k1-sys v0.10.1
    Checking possiblyrandom v0.2.0 (/Users/erohrer/workspace/rust-lightning/possiblyrandom)
   Compiling lightning-macros v0.1.0 (/Users/erohrer/workspace/rust-lightning/lightning-macros)
    Checking bitcoin-internals v0.3.0
    Checking bitcoin_hashes v0.14.0
    Checking serde_json v1.0.133
    Checking chrono v0.4.38
error[E0602]: unknown lint: `clippy::manual_div_ceil`
  |
  = help: did you mean: `clippy::manual_filter`
  = note: requested on the command line with `-A clippy::manual_div_ceil`
  = note: `-D unknown-lints` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(unknown_lints)]`

error[E0602]: unknown lint: `clippy::manual_inspect`
  |
  = help: did you mean: `clippy::manual_assert`
  = note: requested on the command line with `-A clippy::manual_inspect`

For more information about this error, try `rustc --explain E0602`.
error: could not compile `possiblyrandom` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `lightning-macros` (lib) due to 2 previous errors
error: could not compile `lightning-macros` (lib) due to 2 previous errors
exit 101

@arik-so
Copy link
Contributor Author

arik-so commented Dec 5, 2024

I did, but I was testing some rust beta stuff and imagine it installed a newer version of the dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants