Skip to content
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

Deny all the pedantic clippy lints that we already obey #2201

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,31 @@ RUST_2018_IDIOMS = -D bare-trait-objects \

DENY = -D warnings -D future-incompatible -D unused ${RUST_2018_IDIOMS}

CLIPPY_DENY = -D clippy::cast_lossless \
-D clippy::cast_possible_truncation \
-D clippy::needless_borrow \
-D clippy::needless_continue \
-D clippy::option_option
CLIPPY_DENY = -D clippy::pedantic \
-A clippy::cast_possible_wrap \
-A clippy::cast_sign_loss \
-A clippy::default_trait_access \
-A clippy::doc_markdown \
-A clippy::explicit_iter_loop \
-A clippy::filter_map \
-A clippy::filter_map_next \
-A clippy::find_map \
-A clippy::if_not_else \
-A clippy::items_after_statements \
-A clippy::map_unwrap_or \
-A clippy::match_same_arms \
-A clippy::match_wildcard_for_single_variants \
-A clippy::missing_errors_doc \
-A clippy::must_use_candidate \
-A clippy::module_name_repetitions \
-A clippy::needless_pass_by_value \
-A clippy::non_ascii_literal \
-A clippy::redundant-closure-for-method-calls \
-A clippy::shadow_unrelated \
-A clippy::single_match_else \
-A clippy::too_many_lines \
-A clippy::unseparated_literal_suffix \
-A clippy::unused_self
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious about this one. This may actually be good information to have. We could then theoretically remove self if it's not used which I could see improving code quality so that a reference to self is not taken if it's not needed, allowing us to have slightly more flexibility when bumping up against the borrow checker.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, take that allow off and the results are actually somewhat interesting. But I think this makes sense to merge for now. You can pursue that later if you want to, or maybe it would be a good learning opportunity for @lleshchi.

Copy link
Member

Choose a reason for hiding this comment

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

I'll approve then. Would you like me to file another issue to follow up on that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll approve then. Would you like me to file another issue to follow up on that?

Yes, please do.


${HOME}/.cargo/bin/cargo-outdated:
cargo install cargo-outdated
Expand Down