|
1 | 1 | # https://github.com/ericseppanen/cargo-cranky
|
2 | 2 | # cargo install cargo-cranky && cargo cranky
|
3 | 3 |
|
4 |
| -deny = [ |
5 |
| - "unsafe_code", |
6 |
| -] |
| 4 | +deny = ["unsafe_code"] |
7 | 5 |
|
8 | 6 | warn = [
|
9 |
| - "clippy::all", |
10 |
| - "clippy::await_holding_lock", |
11 |
| - "clippy::char_lit_as_u8", |
12 |
| - "clippy::checked_conversions", |
13 |
| - "clippy::dbg_macro", |
14 |
| - "clippy::debug_assert_with_mut_call", |
15 |
| - "clippy::disallowed_methods", |
16 |
| - "clippy::disallowed_script_idents", |
17 |
| - "clippy::doc_markdown", |
18 |
| - "clippy::empty_enum", |
19 |
| - "clippy::enum_glob_use", |
20 |
| - "clippy::equatable_if_let", |
21 |
| - "clippy::exit", |
22 |
| - "clippy::expl_impl_clone_on_copy", |
23 |
| - "clippy::explicit_deref_methods", |
24 |
| - "clippy::explicit_into_iter_loop", |
25 |
| - "clippy::explicit_iter_loop", |
26 |
| - "clippy::fallible_impl_from", |
27 |
| - "clippy::filter_map_next", |
28 |
| - "clippy::flat_map_option", |
29 |
| - "clippy::float_cmp_const", |
30 |
| - "clippy::fn_params_excessive_bools", |
31 |
| - "clippy::fn_to_numeric_cast_any", |
32 |
| - "clippy::from_iter_instead_of_collect", |
33 |
| - "clippy::if_let_mutex", |
34 |
| - "clippy::implicit_clone", |
35 |
| - "clippy::imprecise_flops", |
36 |
| - "clippy::index_refutable_slice", |
37 |
| - "clippy::inefficient_to_string", |
38 |
| - "clippy::invalid_upcast_comparisons", |
39 |
| - "clippy::iter_not_returning_iterator", |
40 |
| - "clippy::large_digit_groups", |
41 |
| - "clippy::large_stack_arrays", |
42 |
| - "clippy::large_types_passed_by_value", |
43 |
| - "clippy::let_unit_value", |
44 |
| - "clippy::linkedlist", |
45 |
| - "clippy::lossy_float_literal", |
46 |
| - "clippy::macro_use_imports", |
47 |
| - "clippy::manual_assert", |
48 |
| - "clippy::manual_ok_or", |
49 |
| - "clippy::map_err_ignore", |
50 |
| - "clippy::map_flatten", |
51 |
| - "clippy::map_unwrap_or", |
52 |
| - "clippy::match_on_vec_items", |
53 |
| - "clippy::match_same_arms", |
54 |
| - "clippy::match_wild_err_arm", |
55 |
| - "clippy::match_wildcard_for_single_variants", |
56 |
| - "clippy::mem_forget", |
57 |
| - "clippy::mismatched_target_os", |
58 |
| - "clippy::missing_enforced_import_renames", |
59 |
| - "clippy::missing_errors_doc", |
60 |
| - "clippy::missing_safety_doc", |
61 |
| - "clippy::mut_mut", |
62 |
| - "clippy::mutex_integer", |
63 |
| - "clippy::needless_borrow", |
64 |
| - "clippy::needless_continue", |
65 |
| - "clippy::needless_for_each", |
66 |
| - "clippy::needless_pass_by_value", |
67 |
| - "clippy::negative_feature_names", |
68 |
| - "clippy::nonstandard_macro_braces", |
69 |
| - "clippy::option_option", |
70 |
| - "clippy::path_buf_push_overwrite", |
71 |
| - "clippy::ptr_as_ptr", |
72 |
| - "clippy::rc_mutex", |
73 |
| - "clippy::ref_option_ref", |
74 |
| - "clippy::rest_pat_in_fully_bound_structs", |
75 |
| - "clippy::same_functions_in_if_condition", |
76 |
| - "clippy::semicolon_if_nothing_returned", |
77 |
| - "clippy::single_match_else", |
78 |
| - "clippy::str_to_string", |
79 |
| - "clippy::string_add_assign", |
80 |
| - "clippy::string_add", |
81 |
| - "clippy::string_lit_as_bytes", |
82 |
| - "clippy::string_to_string", |
83 |
| - "clippy::todo", |
84 |
| - "clippy::trailing_empty_array", |
85 |
| - "clippy::trait_duplication_in_bounds", |
86 |
| - "clippy::unimplemented", |
87 |
| - "clippy::unnecessary_wraps", |
88 |
| - "clippy::unnested_or_patterns", |
89 |
| - "clippy::unused_self", |
90 |
| - "clippy::useless_transmute", |
91 |
| - "clippy::verbose_file_reads", |
92 |
| - "clippy::zero_sized_map_values", |
93 |
| - "elided_lifetimes_in_paths", |
94 |
| - "future_incompatible", |
95 |
| - "nonstandard_style", |
96 |
| - "rust_2018_idioms", |
97 |
| - "rust_2021_prelude_collisions", |
98 |
| - "rustdoc::missing_crate_level_docs", |
99 |
| - "semicolon_in_expressions_from_macros", |
100 |
| - "trivial_numeric_casts", |
101 |
| - "unused_extern_crates", |
102 |
| - "unused_import_braces", |
103 |
| - "unused_lifetimes", |
104 |
| - # "clippy::cloned_instead_of_copied", |
105 |
| - # "clippy::mod_module_files", |
106 |
| - # "trivial_casts", |
107 |
| - # "unused_qualifications", |
| 7 | + "clippy::all", |
| 8 | + "clippy::await_holding_lock", |
| 9 | + "clippy::bool_to_int_with_if", |
| 10 | + "clippy::char_lit_as_u8", |
| 11 | + "clippy::checked_conversions", |
| 12 | + "clippy::dbg_macro", |
| 13 | + "clippy::debug_assert_with_mut_call", |
| 14 | + "clippy::disallowed_methods", |
| 15 | + "clippy::disallowed_script_idents", |
| 16 | + "clippy::doc_link_with_quotes", |
| 17 | + "clippy::doc_markdown", |
| 18 | + "clippy::empty_enum", |
| 19 | + "clippy::enum_glob_use", |
| 20 | + "clippy::equatable_if_let", |
| 21 | + "clippy::exit", |
| 22 | + "clippy::expl_impl_clone_on_copy", |
| 23 | + "clippy::explicit_deref_methods", |
| 24 | + "clippy::explicit_into_iter_loop", |
| 25 | + "clippy::explicit_iter_loop", |
| 26 | + "clippy::fallible_impl_from", |
| 27 | + "clippy::filter_map_next", |
| 28 | + "clippy::flat_map_option", |
| 29 | + "clippy::float_cmp_const", |
| 30 | + "clippy::fn_params_excessive_bools", |
| 31 | + "clippy::fn_to_numeric_cast_any", |
| 32 | + "clippy::from_iter_instead_of_collect", |
| 33 | + "clippy::if_let_mutex", |
| 34 | + "clippy::implicit_clone", |
| 35 | + "clippy::imprecise_flops", |
| 36 | + "clippy::index_refutable_slice", |
| 37 | + "clippy::inefficient_to_string", |
| 38 | + "clippy::invalid_upcast_comparisons", |
| 39 | + "clippy::iter_not_returning_iterator", |
| 40 | + "clippy::iter_on_empty_collections", |
| 41 | + "clippy::iter_on_single_items", |
| 42 | + "clippy::large_digit_groups", |
| 43 | + "clippy::large_stack_arrays", |
| 44 | + "clippy::large_types_passed_by_value", |
| 45 | + "clippy::let_unit_value", |
| 46 | + "clippy::linkedlist", |
| 47 | + "clippy::lossy_float_literal", |
| 48 | + "clippy::macro_use_imports", |
| 49 | + "clippy::manual_assert", |
| 50 | + "clippy::manual_instant_elapsed", |
| 51 | + "clippy::manual_ok_or", |
| 52 | + "clippy::manual_string_new", |
| 53 | + "clippy::map_err_ignore", |
| 54 | + "clippy::map_flatten", |
| 55 | + "clippy::map_unwrap_or", |
| 56 | + "clippy::match_on_vec_items", |
| 57 | + "clippy::match_same_arms", |
| 58 | + "clippy::match_wild_err_arm", |
| 59 | + "clippy::match_wildcard_for_single_variants", |
| 60 | + "clippy::mem_forget", |
| 61 | + "clippy::mismatched_target_os", |
| 62 | + "clippy::mismatching_type_param_order", |
| 63 | + "clippy::missing_enforced_import_renames", |
| 64 | + "clippy::missing_errors_doc", |
| 65 | + "clippy::missing_safety_doc", |
| 66 | + "clippy::mut_mut", |
| 67 | + "clippy::mutex_integer", |
| 68 | + "clippy::needless_borrow", |
| 69 | + "clippy::needless_continue", |
| 70 | + "clippy::needless_for_each", |
| 71 | + "clippy::needless_pass_by_value", |
| 72 | + "clippy::negative_feature_names", |
| 73 | + "clippy::nonstandard_macro_braces", |
| 74 | + "clippy::option_option", |
| 75 | + "clippy::path_buf_push_overwrite", |
| 76 | + "clippy::ptr_as_ptr", |
| 77 | + "clippy::rc_mutex", |
| 78 | + "clippy::ref_option_ref", |
| 79 | + "clippy::rest_pat_in_fully_bound_structs", |
| 80 | + "clippy::same_functions_in_if_condition", |
| 81 | + "clippy::semicolon_if_nothing_returned", |
| 82 | + "clippy::single_match_else", |
| 83 | + "clippy::str_to_string", |
| 84 | + "clippy::string_add_assign", |
| 85 | + "clippy::string_add", |
| 86 | + "clippy::string_lit_as_bytes", |
| 87 | + "clippy::string_to_string", |
| 88 | + "clippy::todo", |
| 89 | + "clippy::trailing_empty_array", |
| 90 | + "clippy::trait_duplication_in_bounds", |
| 91 | + "clippy::unimplemented", |
| 92 | + "clippy::unnecessary_wraps", |
| 93 | + "clippy::unnested_or_patterns", |
| 94 | + "clippy::unused_peekable", |
| 95 | + "clippy::unused_rounding", |
| 96 | + "clippy::unused_self", |
| 97 | + "clippy::useless_transmute", |
| 98 | + "clippy::verbose_file_reads", |
| 99 | + "clippy::zero_sized_map_values", |
| 100 | + "elided_lifetimes_in_paths", |
| 101 | + "future_incompatible", |
| 102 | + "nonstandard_style", |
| 103 | + "rust_2018_idioms", |
| 104 | + "rust_2021_prelude_collisions", |
| 105 | + "rustdoc::missing_crate_level_docs", |
| 106 | + "semicolon_in_expressions_from_macros", |
| 107 | + "trivial_numeric_casts", |
| 108 | + "unused_extern_crates", |
| 109 | + "unused_import_braces", |
| 110 | + "unused_lifetimes", |
108 | 111 | ]
|
109 | 112 |
|
110 | 113 | allow = [
|
| 114 | + # TODO(emilk): enable more lints |
| 115 | + "clippy::cloned_instead_of_copied", |
111 | 116 | "clippy::derive_partial_eq_without_eq",
|
112 | 117 | "clippy::type_complexity",
|
113 |
| - "clippy::unnecessary_lazy_evaluations", |
114 |
| - "clippy::let-and-return" |
| 118 | + "clippy::undocumented_unsafe_blocks", |
| 119 | + "trivial_casts", |
| 120 | + "unsafe_op_in_unsafe_fn", # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668 |
| 121 | + "unused_qualifications", |
115 | 122 | ]
|
0 commit comments