parent
9a3e4c47d0
commit
4b03d791b5
1 changed files with 13 additions and 138 deletions
151
Cargo.toml
151
Cargo.toml
|
@ -802,147 +802,26 @@ unexpected_cfgs = { level = "allow" }
|
||||||
dbg_macro = "deny"
|
dbg_macro = "deny"
|
||||||
todo = "deny"
|
todo = "deny"
|
||||||
|
|
||||||
# Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
|
# We currently do not restrict any style rules
|
||||||
# warning on this rule produces a lot of noise.
|
# as it slows down shipping code to Zed.
|
||||||
single_range_in_vec_init = "allow"
|
|
||||||
|
|
||||||
redundant_clone = "warn"
|
|
||||||
declare_interior_mutable_const = "deny"
|
|
||||||
|
|
||||||
# These are all of the rules that currently have violations in the Zed
|
|
||||||
# codebase.
|
|
||||||
#
|
#
|
||||||
# We'll want to drive this list down by either:
|
# Running ./script/clippy can take several minutes, and so it's
|
||||||
# 1. fixing violations of the rule and begin enforcing it
|
# common to skip that step and let CI do it. Any unexpected failures
|
||||||
# 2. deciding we want to allow the rule permanently, at which point
|
# (which also take minutes to discover) thus require switching back
|
||||||
# we should codify that separately above.
|
# to an old branch, manual fixing, and re-pushing.
|
||||||
#
|
#
|
||||||
# This list shouldn't be added to; it should only get shorter.
|
# In the future we could improve this by either making sure
|
||||||
# =============================================================================
|
# Zed can surface clippy errors in diagnostics (in addition to the
|
||||||
|
# rust-analyzer errors), or by having CI fix style nits automatically.
|
||||||
# There are a bunch of rules currently failing in the `style` group, so
|
|
||||||
# allow all of those, for now.
|
|
||||||
style = { level = "allow", priority = -1 }
|
style = { level = "allow", priority = -1 }
|
||||||
|
|
||||||
# Temporary list of style lints that we've fixed so far.
|
|
||||||
# Progress is being tracked in #36577
|
|
||||||
blocks_in_conditions = "warn"
|
|
||||||
bool_assert_comparison = "warn"
|
|
||||||
borrow_interior_mutable_const = "warn"
|
|
||||||
box_default = "warn"
|
|
||||||
builtin_type_shadow = "warn"
|
|
||||||
bytes_nth = "warn"
|
|
||||||
chars_next_cmp = "warn"
|
|
||||||
cmp_null = "warn"
|
|
||||||
collapsible_else_if = "warn"
|
|
||||||
collapsible_if = "warn"
|
|
||||||
comparison_to_empty = "warn"
|
|
||||||
default_instead_of_iter_empty = "warn"
|
|
||||||
disallowed_macros = "warn"
|
|
||||||
disallowed_methods = "warn"
|
|
||||||
disallowed_names = "warn"
|
|
||||||
disallowed_types = "warn"
|
|
||||||
doc_lazy_continuation = "warn"
|
|
||||||
doc_overindented_list_items = "warn"
|
|
||||||
duplicate_underscore_argument = "warn"
|
|
||||||
err_expect = "warn"
|
|
||||||
fn_to_numeric_cast = "warn"
|
|
||||||
fn_to_numeric_cast_with_truncation = "warn"
|
|
||||||
for_kv_map = "warn"
|
|
||||||
implicit_saturating_add = "warn"
|
|
||||||
implicit_saturating_sub = "warn"
|
|
||||||
inconsistent_digit_grouping = "warn"
|
|
||||||
infallible_destructuring_match = "warn"
|
|
||||||
inherent_to_string = "warn"
|
|
||||||
init_numbered_fields = "warn"
|
|
||||||
into_iter_on_ref = "warn"
|
|
||||||
io_other_error = "warn"
|
|
||||||
items_after_test_module = "warn"
|
|
||||||
iter_cloned_collect = "warn"
|
|
||||||
iter_next_slice = "warn"
|
|
||||||
iter_nth = "warn"
|
|
||||||
iter_nth_zero = "warn"
|
|
||||||
iter_skip_next = "warn"
|
|
||||||
just_underscores_and_digits = "warn"
|
|
||||||
len_zero = "warn"
|
|
||||||
let_and_return = "warn"
|
|
||||||
main_recursion = "warn"
|
|
||||||
manual_bits = "warn"
|
|
||||||
manual_dangling_ptr = "warn"
|
|
||||||
manual_is_ascii_check = "warn"
|
|
||||||
manual_is_finite = "warn"
|
|
||||||
manual_is_infinite = "warn"
|
|
||||||
manual_map = "warn"
|
|
||||||
manual_next_back = "warn"
|
|
||||||
manual_non_exhaustive = "warn"
|
|
||||||
manual_ok_or = "warn"
|
|
||||||
manual_pattern_char_comparison = "warn"
|
|
||||||
manual_rotate = "warn"
|
|
||||||
manual_slice_fill = "warn"
|
|
||||||
manual_while_let_some = "warn"
|
|
||||||
map_clone = "warn"
|
|
||||||
map_collect_result_unit = "warn"
|
|
||||||
match_like_matches_macro = "warn"
|
|
||||||
match_overlapping_arm = "warn"
|
|
||||||
mem_replace_option_with_none = "warn"
|
|
||||||
mem_replace_option_with_some = "warn"
|
|
||||||
missing_enforced_import_renames = "warn"
|
|
||||||
missing_safety_doc = "warn"
|
|
||||||
mixed_attributes_style = "warn"
|
|
||||||
mixed_case_hex_literals = "warn"
|
|
||||||
module_inception = "warn"
|
|
||||||
must_use_unit = "warn"
|
|
||||||
mut_mutex_lock = "warn"
|
|
||||||
needless_borrow = "warn"
|
|
||||||
needless_doctest_main = "warn"
|
|
||||||
needless_else = "warn"
|
|
||||||
needless_parens_on_range_literals = "warn"
|
|
||||||
needless_pub_self = "warn"
|
|
||||||
needless_return = "warn"
|
|
||||||
needless_return_with_question_mark = "warn"
|
|
||||||
non_minimal_cfg = "warn"
|
|
||||||
ok_expect = "warn"
|
|
||||||
owned_cow = "warn"
|
|
||||||
print_literal = "warn"
|
|
||||||
print_with_newline = "warn"
|
|
||||||
println_empty_string = "warn"
|
|
||||||
ptr_eq = "warn"
|
|
||||||
question_mark = "warn"
|
|
||||||
redundant_closure = "warn"
|
|
||||||
redundant_field_names = "warn"
|
|
||||||
redundant_pattern_matching = "warn"
|
|
||||||
redundant_static_lifetimes = "warn"
|
|
||||||
result_map_or_into_option = "warn"
|
|
||||||
self_named_constructors = "warn"
|
|
||||||
single_match = "warn"
|
|
||||||
tabs_in_doc_comments = "warn"
|
|
||||||
to_digit_is_some = "warn"
|
|
||||||
toplevel_ref_arg = "warn"
|
|
||||||
unnecessary_fold = "warn"
|
|
||||||
unnecessary_map_or = "warn"
|
|
||||||
unnecessary_mut_passed = "warn"
|
|
||||||
unnecessary_owned_empty_strings = "warn"
|
|
||||||
unneeded_struct_pattern = "warn"
|
|
||||||
unsafe_removed_from_name = "warn"
|
|
||||||
unused_unit = "warn"
|
|
||||||
unusual_byte_groupings = "warn"
|
|
||||||
while_let_on_iterator = "warn"
|
|
||||||
write_literal = "warn"
|
|
||||||
write_with_newline = "warn"
|
|
||||||
writeln_empty_string = "warn"
|
|
||||||
wrong_self_convention = "warn"
|
|
||||||
zero_ptr = "warn"
|
|
||||||
|
|
||||||
# Individual rules that have violations in the codebase:
|
# Individual rules that have violations in the codebase:
|
||||||
type_complexity = "allow"
|
type_complexity = "allow"
|
||||||
# We often return trait objects from `new` functions.
|
|
||||||
new_ret_no_self = { level = "allow" }
|
|
||||||
# We have a few `next` functions that differ in lifetimes
|
|
||||||
# compared to Iterator::next. Yet, clippy complains about those.
|
|
||||||
should_implement_trait = { level = "allow" }
|
|
||||||
let_underscore_future = "allow"
|
let_underscore_future = "allow"
|
||||||
# It doesn't make sense to implement `Default` unilaterally.
|
|
||||||
new_without_default = "allow"
|
# Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
|
||||||
|
# warning on this rule produces a lot of noise.
|
||||||
|
single_range_in_vec_init = "allow"
|
||||||
|
|
||||||
# in Rust it can be very tedious to reduce argument count without
|
# in Rust it can be very tedious to reduce argument count without
|
||||||
# running afoul of the borrow checker.
|
# running afoul of the borrow checker.
|
||||||
|
@ -951,10 +830,6 @@ too_many_arguments = "allow"
|
||||||
# We often have large enum variants yet we rarely actually bother with splitting them up.
|
# We often have large enum variants yet we rarely actually bother with splitting them up.
|
||||||
large_enum_variant = "allow"
|
large_enum_variant = "allow"
|
||||||
|
|
||||||
# `enum_variant_names` fires for all enums, even when they derive serde traits.
|
|
||||||
# Adhering to this lint would be a breaking change.
|
|
||||||
enum_variant_names = "allow"
|
|
||||||
|
|
||||||
[workspace.metadata.cargo-machete]
|
[workspace.metadata.cargo-machete]
|
||||||
ignored = [
|
ignored = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue