-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Prepare for clippy pedantic rules #8201
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
ok, if you have made a script for this, please do one commit per rule then :) |
|
GNU testsuite comparison: |
af8ffcc to
35f3975
Compare
Contributor
Author
|
I hope it's better now |
|
GNU testsuite comparison: |
Contributor
|
It is, thanks :) |
Contributor
|
thanks |
Contributor
Author
|
Sure, I will make another pr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Works on #4949
These rules pass without any issues:
These rules are skipped because of #6720 (review) :
I made a bash script for testing each rule without losing my mind on the terminal, I leave it here, I think can be useful:
rules=( # skipped rules more investigation needed # bool_to_int_with_if # cloned_instead_of_copied # large_stack_arrays # map_unwrap_or # match_same_arms # needless_pass_by_value # redundant_closure_for_method_calls # semicolon_if_nothing_returned # single_match_else # return_self_not_must_use # unnecessary_wraps # used_underscore_binding # these rules needed modifications explicit_iter_loop if_not_else inefficient_to_string manual_let_else manual_string_new match_wildcard_for_single_variants needless_continue redundant_else uninlined_format_args unnested_or_patterns # these rules pass with no issue checked_conversions explicit_deref_methods explicit_into_iter_loop filter_map_next flat_map_option float_cmp from_iter_instead_of_collect implicit_clone inconsistent_struct_constructor invalid_upcast_comparisons iter_not_returning_iterator large_digit_groups large_types_passed_by_value linkedlist macro_use_imports manual_assert manual_instant_elapsed manual_ok_or match_bool maybe_infinite_iter mismatching_type_param_order mut_mut naive_bytecount needless_bitwise_bool needless_for_each no_effect_underscore_binding range_minus_one range_plus_one ref_option_ref same_functions_in_if_condition stable_sort_primitive string_add_assign unnecessary_box_returns unnecessary_join unreadable_literal unsafe_derive_deserialize unused_async unused_self zero_sized_map_values ) echo "Running all rules together..." cargo clippy -- $(printf -- '-Wclippy::%s ' "${rules[@]}")