Skip to content

Most commonly ignored lints on crates.io #7666

Closed

Description

This is a similar methodology to #5418, but using all published crates on crates.io as the data source, rather than repos indexed by grep.app. The old table is a year and a half out of date at this point and hard to reproduce, so I've gone ahead and closed that issue. The code to generate the table below is in https://github.com/dtolnay/noisy-clippy.

The global column is counting #![allow(...)] attributes indicating that a lint has been suppressed at the whole crate or module level, and local is counting #[allow(...)] where a lint has been suppressed at only one place it is being triggered. The table is sorted by the sum.

local global lint name category
3311 519 type_complexity complexity
2369 526 too_many_arguments complexity
2175 79 wrong_self_convention style
827 390 upper_case_acronyms style
236 966 all unknown
855 70 cast_ptr_alignment correctness pedantic
619 285 many_single_char_names pedantic
722 125 large_enum_variant perf
707 132 cognitive_complexity complexity nursery
334 473 unreadable_literal style pedantic
29 774 let_unit_value style pedantic
620 163 cast_possible_truncation pedantic
485 164 float_cmp correctness
247 384 module_name_repetitions pedantic
506 94 trivially_copy_pass_by_ref perf pedantic
381 125 needless_pass_by_value style pedantic
418 82 identity_op complexity
458 29 unwrap_used restriction
401 75 new_ret_no_self style
358 105 cast_sign_loss pedantic
393 64 unnecessary_wraps complexity pedantic
229 225 missing_safety_doc style
339 109 should_implement_trait style
248 179 new_without_default style
338 34 missing_inline_in_public_items restriction
265 106 too_many_lines pedantic
285 59 len_without_is_empty style
205 114 module_inception style
157 142 integer_arithmetic restriction
234 64 needless_range_loop style
194 94 use_self nursery
227 54 ptr_arg style
33 230 needless_doctest_main style
218 44 suspicious_arithmetic_impl suspicious
167 90 cast_possible_wrap pedantic
34 211 missing_errors_doc pedantic
133 110 excessive_precision style
104 139 from_over_into style
37 203 must_use_candidate pedantic
187 47 missing_const_for_fn nursery
153 71 cast_precision_loss pedantic
94 125 cast_lossless pedantic
142 74 redundant_closure style
115 94 not_unsafe_ptr_arg_deref correctness
142 64 single_match style
124 72 let_and_return style
138 55 needless_lifetimes complexity
72 117 similar_names pedantic
170 16 useless_conversion complexity
65 121 wildcard_imports pedantic
93 91 match_single_binding complexity
159 23 unused_self pedantic
29 151 doc_markdown pedantic
114 61 match_same_arms pedantic
172 3 mut_from_ref correctness
137 38 unknown_clippy_lints unknown
135 37 eq_op correctness
116 53 missing_panics_doc pedantic
118 44 collapsible_if style
146 8 clone_on_copy complexity
62 90 approx_constant correctness
33 115 needless_return style
117 29 redundant_clone perf
116 29 redundant_pub_crate nursery
120 22 enum_variant_names style
69 69 inline_always pedantic
105 33 type_repetition_in_bounds pedantic
115 21 derive_hash_xor_eq correctness
43 92 non_ascii_literal pedantic
73 60 option_if_let_else pedantic nursery
90 31 comparison_chain style
59 61 match_like_matches_macro style
57 62 shadow_unrelated pedantic
79 40 transmute_ptr_to_ptr pedantic
57 61 missing_docs_in_private_items restriction
84 34 used_underscore_binding pedantic
97 20 if_same_then_else correctness
21 94 unused_unit style
0 111 multiple_crate_versions cargo
105 4 expect_used restriction
71 37 mutex_atomic perf
57 50 indexing_slicing restriction
90 12 borrowed_box complexity
46 56 unit_arg complexity
25 69 field_reassign_with_default style
76 18 result_unit_err style
15 77 default_trait_access pedantic
86 5 uninit_assumed_init correctness
79 10 mut_mut pedantic
54 35 never_loop correctness
81 7 map_entry perf
69 17 exhaustive_structs restriction
21 65 redundant_field_names style
51 34 suspicious_op_assign_impl suspicious
79 5 erasing_op correctness
54 29 as_conversions restriction
57 26 implicit_hasher style pedantic
49 32 or_fun_call perf
18 62 print_stdout restriction
61 17 assertions_on_constants style
66 11 needless_collect perf
40 37 op_ref style
68 8 pattern_type_mismatch restriction
47 28 suspicious_else_formatting suspicious
55 20 wildcard_enum_match_arm restriction
60 14 cyclomatic_complexity unknown
56 16 range_plus_one complexity pedantic
14 58 single_match_else pedantic
58 13 reversed_empty_ranges correctness
18 52 assign_op_pattern style
30 39 blacklisted_name style
22 47 match_bool style pedantic
48 21 struct_excessive_bools pedantic
19 49 if_not_else pedantic
56 12 option_option complexity pedantic
58 10 rc_buffer perf restriction
21 46 enum_glob_use pedantic
64 3 suspicious_operation_groupings style nursery
59 6 empty_loop suspicious
46 18 inconsistent_digit_grouping style
54 10 mutable_key_type suspicious
0 62 implicit_return restriction
44 18 zero_prefixed_literal complexity
9 52 redundant_static_lifetimes style
61 0 ref_option_ref pedantic
53 6 clone_double_ref correctness
51 8 match_wild_err_arm style pedantic
21 36 borrow_interior_mutable_const correctness style
49 8 declare_interior_mutable_const correctness style
46 11 useless_attribute correctness
41 15 eval_order_dependence suspicious
44 12 semicolon_if_nothing_returned pedantic
36 18 collapsible_else_if style
14 40 redundant_closure_call complexity
53 0 drop_bounds unknown
32 21 unnecessary_cast complexity
39 13 ptr_offset_with_cast complexity
23 29 pub_enum_variant_names deprecated
18 33 manual_range_contains style
26 24 deref_addrof complexity
13 36 items_after_statements pedantic
42 6 let_underscore_must_use restriction
45 3 same_item_push style
38 8 boxed_local perf
38 8 exhaustive_enums restriction
39 6 branches_sharing_code nursery
38 7 map_clone style
18 27 useless_transmute nursery
1 43 tabs_in_doc_comments style
19 24 panic restriction
2 41 unseparated_literal_suffix pedantic
40 3 while_let_on_iterator style
27 15 map_err_ignore restriction
14 27 float_arithmetic restriction
15 26 shadow_reuse restriction
28 12 blocks_in_if_conditions style
26 14 manual_map style
28 12 manual_strip complexity
1 38 nonstandard_macro_braces style nursery
9 30 pedantic unknown
12 27 string_lit_as_bytes style nursery
33 6 unnecessary_unwrap complexity
34 5 vec_box complexity
18 21 write_with_newline style
38 0 zero_sized_map_values pedantic
0 37 dbg_macro restriction
26 11 redundant_pattern_matching style
13 24 unneeded_field_pattern restriction
19 18 useless_let_if_seq style nursery
30 6 absurd_extreme_comparisons correctness
34 1 cast_ref_to_mut correctness
18 17 filter_map deprecated
19 16 new_without_default_derive unknown
16 19 single_component_path_imports style
26 9 trivial_regex style nursery
12 22 integer_division pedantic restriction
21 13 len_zero style
26 8 needless_bool complexity
14 20 unusual_byte_groupings style
1 32 deprecated_cfg_attr complexity
30 2 extra_unused_lifetimes complexity
22 10 nonminimal_bool complexity
0 31 blanket_clippy_restriction_lints suspicious
25 6 partialeq_ne_impl complexity
30 0 derive_ord_xor_partial_ord correctness
17 13 stutter unknown
9 21 unnested_or_patterns complexity pedantic
3 26 else_if_without_else restriction
25 4 forget_copy correctness
3 26 let_underscore_drop pedantic
18 11 vec_init_then_push perf
12 16 bool_comparison complexity
14 13 empty_enum pedantic
15 12 option_unwrap_used unknown
14 12 fallible_impl_from nursery
16 10 manual_non_exhaustive style
15 11 needless_update complexity
14 12 suspicious_map suspicious
10 15 match_wildcard_for_single_variants pedantic
11 14 use_debug restriction
23 1 no_effect complexity
13 11 print_literal style
1 23 redundant_else pedantic
4 20 renamed_and_removed_lints unknown
13 11 unit_cmp correctness
22 1 into_iter_on_ref style
15 8 neg_cmp_op_on_partial_ord complexity
7 16 toplevel_ref_arg style
12 11 unnecessary_operation complexity
18 4 drop_copy correctness
11 11 expect_fun_call perf
12 10 inherent_to_string style
12 10 transmute_ptr_to_ref complexity
14 7 explicit_counter_loop complexity
5 16 match_ref_pats style
13 8 suboptimal_flops nursery
14 7 unimplemented restriction
1 20 unreachable restriction
17 4 wildcard_in_or_patterns complexity
21 0 zero_ptr style
15 5 iter_nth_zero style
8 12 option_map_unit_fn complexity
9 10 block_in_if_condition_stmt unknown
13 6 int_plus_one complexity
12 7 result_unwrap_used unknown
7 11 complexity unknown
4 14 expl_impl_clone_on_copy pedantic
2 16 precedence complexity
4 14 try_err style
5 13 verbose_bit_mask style pedantic
0 17 clone_on_ref_ptr restriction
13 4 while_let_loop complexity
11 5 cmp_owned perf
12 4 identity_conversion unknown
7 9 just_underscores_and_digits style
8 8 needless_borrow style
16 0 needless_continue pedantic
9 7 vtable_address_comparisons correctness
12 3 collapsible_match style
1 14 style unknown
0 14 cargo_common_metadata cargo
7 7 future_not_send nursery
12 2 option_as_ref_deref complexity
11 3 redundant_allocation perf
14 0 stable_sort_primitive perf
7 6 bool_assert_comparison style
12 1 mem_forget restriction
8 5 useless_vec perf
8 4 await_holding_refcell_ref correctness pedantic
11 1 box_vec perf
1 11 checked_conversions pedantic
3 9 from_iter_instead_of_collect pedantic
10 2 manual_filter_map complexity
6 6 redundant_closure_for_method_calls pedantic
5 7 unused_io_amount correctness
10 1 mem_discriminant_non_enum correctness
4 7 ptr_as_ptr pedantic
8 3 unnecessary_mut_passed style
3 7 const_static_lifetime unknown
7 3 debug_assert_with_mut_call nursery
9 1 drop_ref correctness
10 0 filter_next complexity
10 0 manual_flatten complexity
0 10 multiple_inherent_impl restriction
1 9 nursery unknown
4 6 redundant_slicing complexity
6 4 unsafe_derive_deserialize pedantic
1 8 explicit_iter_loop pedantic
9 0 forget_ref correctness
8 1 match_overlapping_arm style
2 7 panic_in_result_fn restriction
6 3 single_char_pattern perf
5 4 write_literal style
4 4 clippy unknown
1 7 decimal_literal_representation restriction
7 1 fn_address_comparisons correctness
8 0 infallible_destructuring_match style
6 2 manual_memcpy perf
0 8 match_on_vec_items pedantic
0 8 modulo_arithmetic restriction
8 0 size_of_in_element_count correctness
5 3 unused_async pedantic
1 7 useless_format complexity
6 1 await_holding_lock correctness pedantic
0 7 default_numeric_fallback restriction
6 1 explicit_deref_methods pedantic
7 0 inherent_to_string_shadow_display correctness
6 1 neg_multiply style
0 7 option_map_unwrap_or unknown
0 7 option_map_unwrap_or_else unknown
7 0 unnecessary_sort_by complexity
5 2 unwrap_in_result restriction
5 1 double_parens complexity
4 2 get_unwrap restriction
5 1 manual_swap complexity
0 6 map_unwrap_or pedantic
1 5 mem_replace_with_default style
1 5 option_expect_used unknown
1 5 result_expect_used unknown
1 4 cargo unknown
2 3 empty_line_after_outer_attr nursery
2 3 enum_clike_unportable_variant correctness
3 2 exit restriction
4 1 into_iter_on_array unknown
3 2 manual_async_fn style
5 0 maybe_infinite_iter pedantic
4 1 question_mark style
4 1 unnecessary_filter_map complexity
0 5 wildcard_dependencies cargo
5 0 zero_divided_by_zero complexity
0 4 find_map deprecated
2 2 float_equality_without_abs suspicious
2 2 inefficient_to_string perf pedantic
3 1 manual_unwrap_or complexity
4 0 mut_range_bound suspicious
3 1 naive_bytecount pedantic
0 4 needless_arbitrary_self_type complexity
1 3 needless_question_mark complexity
0 4 possible_missing_comma correctness
2 2 range_minus_one pedantic
4 0 while_immutable_condition correctness
3 0 bad_bit_mask correctness
3 0 case_sensitive_file_extension_comparisons pedantic
0 3 cmp_null style
1 2 comparison_to_empty style
1 2 crosspointer_transmute complexity
3 0 disallowed_method nursery
1 2 explicit_into_iter_loop pedantic
0 3 float_cmp_const restriction
3 0 for_kv_map style
3 0 ifs_same_cond correctness
3 0 map_identity complexity
3 0 ok_expect style
0 3 perf unknown
2 1 print_with_newline style
0 3 shadow_same restriction
2 1 single_char_add_str style
3 0 useless_asref complexity
2 0 char_lit_as_u8 complexity
0 2 cloned_instead_of_copied pedantic
0 2 diverging_sub_expression complexity
0 2 double_must_use style
2 0 for_loops_over_fallibles suspicious
2 0 from_str_radix_10 style
2 0 if_let_redundant_pattern_matching deprecated
1 1 invalid_regex correctness
2 0 invisible_characters correctness
2 0 let_underscore_lock correctness
1 1 linkedlist pedantic
2 0 logic_bug correctness
1 1 manual_find_map complexity
1 1 match_as_ref complexity
2 0 mistyped_literal_suffixes correctness
0 2 mixed_case_hex_literals style
2 0 modulo_one correctness
0 2 needless_for_each pedantic
0 2 non_upper_case_globals unknown
2 0 out_of_bounds_indexing correctness
1 1 panic_params unknown
0 2 panicking_unwrap correctness
1 1 redundant_pattern style
0 2 restriction unknown
1 1 same_functions_in_if_condition pedantic
0 2 string_add restriction
2 0 string_extend_chars style
0 2 suspicious_assignment_formatting suspicious
2 0 transmuting_null correctness
2 0 unnecessary_fold style
1 0 as_conversion unknown
1 0 async_yields_async correctness
0 1 clippy_complexity unknown
1 0 cmp_nan correctness
0 1 copy_iterator pedantic
0 1 create_dir restriction
0 1 deprecated_semver correctness
1 0 explicit_write complexity
1 0 extend_from_slice deprecated
1 0 filetype_is_file restriction
1 0 filter_map_identity complexity
1 0 fn_params_excessive_bools pedantic
1 0 if_let_some_result style
0 1 if_then_some_else_none restriction
0 1 inconsistent_struct_constructor pedantic
1 0 infinite_iter correctness
0 1 inline_asm_x86_intel_syntax restriction
1 0 inline_fn_without_body correctness
1 0 inspect_for_each complexity
1 0 invalid_ref unknown
0 1 iter_count complexity
1 0 iter_nth perf
0 1 large_digit_groups style pedantic
0 1 manual_saturating_arithmetic style
0 1 map_flatten pedantic
1 0 mem_replace_option_with_none style
0 1 mut_mutex_lock style
1 0 option_env_unwrap correctness
1 0 print_stderr restriction
0 1 ptr_eq style
0 1 regex_macro deprecated
0 1 replace_consts deprecated
0 1 result_map_unit_fn complexity
1 0 result_map_unwrap_or_else unknown
0 1 skip_while_next complexity
0 1 to_string_in_display correctness
0 1 todo restriction
0 1 transmute_float_to_int complexity
0 1 transmute_int_to_char complexity
1 0 transmute_int_to_float complexity
1 0 unnecessary_lazy_evaluations style
0 1 unsafe_removed_from_name style
1 0 unsound_collection_transmute correctness
0 1 unused_doc_comment unknown
0 1 unused_parens unknown
0 1 unused_results unknown
1 0 verbose_file_reads restriction
0 1 zero_width_space unknown

@rustbot label +A-category +C-tracking-issue +S-needs-discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-categoryArea: Categorization of lintsC-tracking-issueCategory: Tracking IssueS-needs-discussionStatus: Needs further discussion before merging or work can be started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions