@@ -802,147 +802,26 @@ unexpected_cfgs = { level = "allow" }
802
802
dbg_macro = " deny"
803
803
todo = " deny"
804
804
805
- # Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
806
- # warning on this rule produces a lot of noise.
807
- single_range_in_vec_init = " allow"
808
-
809
- redundant_clone = " warn"
810
- declare_interior_mutable_const = " deny"
811
-
812
- # These are all of the rules that currently have violations in the Zed
813
- # codebase.
805
+ # We currently do not restrict any style rules
806
+ # as it slows down shipping code to Zed.
814
807
#
815
- # We'll want to drive this list down by either:
816
- # 1. fixing violations of the rule and begin enforcing it
817
- # 2. deciding we want to allow the rule permanently, at which point
818
- # we should codify that separately above .
808
+ # Running ./script/clippy can take several minutes, and so it's
809
+ # common to skip that step and let CI do it. Any unexpected failures
810
+ # (which also take minutes to discover) thus require switching back
811
+ # to an old branch, manual fixing, and re-pushing .
819
812
#
820
- # This list shouldn't be added to; it should only get shorter.
821
- # =============================================================================
822
-
823
- # There are a bunch of rules currently failing in the `style` group, so
824
- # allow all of those, for now.
813
+ # In the future we could improve this by either making sure
814
+ # Zed can surface clippy errors in diagnostics (in addition to the
815
+ # rust-analyzer errors), or by having CI fix style nits automatically.
825
816
style = { level = " allow" , priority = -1 }
826
817
827
- # Temporary list of style lints that we've fixed so far.
828
- # Progress is being tracked in #36577
829
- blocks_in_conditions = " warn"
830
- bool_assert_comparison = " warn"
831
- borrow_interior_mutable_const = " warn"
832
- box_default = " warn"
833
- builtin_type_shadow = " warn"
834
- bytes_nth = " warn"
835
- chars_next_cmp = " warn"
836
- cmp_null = " warn"
837
- collapsible_else_if = " warn"
838
- collapsible_if = " warn"
839
- comparison_to_empty = " warn"
840
- default_instead_of_iter_empty = " warn"
841
- disallowed_macros = " warn"
842
- disallowed_methods = " warn"
843
- disallowed_names = " warn"
844
- disallowed_types = " warn"
845
- doc_lazy_continuation = " warn"
846
- doc_overindented_list_items = " warn"
847
- duplicate_underscore_argument = " warn"
848
- err_expect = " warn"
849
- fn_to_numeric_cast = " warn"
850
- fn_to_numeric_cast_with_truncation = " warn"
851
- for_kv_map = " warn"
852
- implicit_saturating_add = " warn"
853
- implicit_saturating_sub = " warn"
854
- inconsistent_digit_grouping = " warn"
855
- infallible_destructuring_match = " warn"
856
- inherent_to_string = " warn"
857
- init_numbered_fields = " warn"
858
- into_iter_on_ref = " warn"
859
- io_other_error = " warn"
860
- items_after_test_module = " warn"
861
- iter_cloned_collect = " warn"
862
- iter_next_slice = " warn"
863
- iter_nth = " warn"
864
- iter_nth_zero = " warn"
865
- iter_skip_next = " warn"
866
- just_underscores_and_digits = " warn"
867
- len_zero = " warn"
868
- let_and_return = " warn"
869
- main_recursion = " warn"
870
- manual_bits = " warn"
871
- manual_dangling_ptr = " warn"
872
- manual_is_ascii_check = " warn"
873
- manual_is_finite = " warn"
874
- manual_is_infinite = " warn"
875
- manual_map = " warn"
876
- manual_next_back = " warn"
877
- manual_non_exhaustive = " warn"
878
- manual_ok_or = " warn"
879
- manual_pattern_char_comparison = " warn"
880
- manual_rotate = " warn"
881
- manual_slice_fill = " warn"
882
- manual_while_let_some = " warn"
883
- map_clone = " warn"
884
- map_collect_result_unit = " warn"
885
- match_like_matches_macro = " warn"
886
- match_overlapping_arm = " warn"
887
- mem_replace_option_with_none = " warn"
888
- mem_replace_option_with_some = " warn"
889
- missing_enforced_import_renames = " warn"
890
- missing_safety_doc = " warn"
891
- mixed_attributes_style = " warn"
892
- mixed_case_hex_literals = " warn"
893
- module_inception = " warn"
894
- must_use_unit = " warn"
895
- mut_mutex_lock = " warn"
896
- needless_borrow = " warn"
897
- needless_doctest_main = " warn"
898
- needless_else = " warn"
899
- needless_parens_on_range_literals = " warn"
900
- needless_pub_self = " warn"
901
- needless_return = " warn"
902
- needless_return_with_question_mark = " warn"
903
- non_minimal_cfg = " warn"
904
- ok_expect = " warn"
905
- owned_cow = " warn"
906
- print_literal = " warn"
907
- print_with_newline = " warn"
908
- println_empty_string = " warn"
909
- ptr_eq = " warn"
910
- question_mark = " warn"
911
- redundant_closure = " warn"
912
- redundant_field_names = " warn"
913
- redundant_pattern_matching = " warn"
914
- redundant_static_lifetimes = " warn"
915
- result_map_or_into_option = " warn"
916
- self_named_constructors = " warn"
917
- single_match = " warn"
918
- tabs_in_doc_comments = " warn"
919
- to_digit_is_some = " warn"
920
- toplevel_ref_arg = " warn"
921
- unnecessary_fold = " warn"
922
- unnecessary_map_or = " warn"
923
- unnecessary_mut_passed = " warn"
924
- unnecessary_owned_empty_strings = " warn"
925
- unneeded_struct_pattern = " warn"
926
- unsafe_removed_from_name = " warn"
927
- unused_unit = " warn"
928
- unusual_byte_groupings = " warn"
929
- while_let_on_iterator = " warn"
930
- write_literal = " warn"
931
- write_with_newline = " warn"
932
- writeln_empty_string = " warn"
933
- wrong_self_convention = " warn"
934
- zero_ptr = " warn"
935
-
936
818
# Individual rules that have violations in the codebase:
937
819
type_complexity = " allow"
938
- # We often return trait objects from `new` functions.
939
- new_ret_no_self = { level = " allow" }
940
- # We have a few `next` functions that differ in lifetimes
941
- # compared to Iterator::next. Yet, clippy complains about those.
942
- should_implement_trait = { level = " allow" }
943
820
let_underscore_future = " allow"
944
- # It doesn't make sense to implement `Default` unilaterally.
945
- new_without_default = " allow"
821
+
822
+ # Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
823
+ # warning on this rule produces a lot of noise.
824
+ single_range_in_vec_init = " allow"
946
825
947
826
# in Rust it can be very tedious to reduce argument count without
948
827
# running afoul of the borrow checker.
@@ -951,10 +830,6 @@ too_many_arguments = "allow"
951
830
# We often have large enum variants yet we rarely actually bother with splitting them up.
952
831
large_enum_variant = " allow"
953
832
954
- # `enum_variant_names` fires for all enums, even when they derive serde traits.
955
- # Adhering to this lint would be a breaking change.
956
- enum_variant_names = " allow"
957
-
958
833
[workspace .metadata .cargo-machete ]
959
834
ignored = [
960
835
" bindgen" ,
0 commit comments