Copy lint tables from https://github.com/rust-lang/rust-analyzer/pull/15017
This commit is contained in:
parent
85c9a83262
commit
1889c6c686
41
Cargo.toml
41
Cargo.toml
@ -138,8 +138,49 @@ xshell = "0.2.5"
|
|||||||
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
|
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
|
||||||
dashmap = { version = "=5.5.3", features = ["raw-api"] }
|
dashmap = { version = "=5.5.3", features = ["raw-api"] }
|
||||||
|
|
||||||
|
[workspace.lints.rust]
|
||||||
|
rust_2018_idioms = "warn"
|
||||||
|
unused_lifetimes = "warn"
|
||||||
|
semicolon_in_expressions_from_macros = "warn"
|
||||||
|
|
||||||
[workspace.lints.clippy]
|
[workspace.lints.clippy]
|
||||||
|
# TODO: Remove the tidy test once the lint table is stable
|
||||||
|
|
||||||
|
# lint groups
|
||||||
|
complexity = { level = "warn", priority = -1 }
|
||||||
|
correctness = { level = "deny", priority = -1 }
|
||||||
|
perf = { level = "deny", priority = -1 }
|
||||||
|
restriction = { level = "allow", priority = -1 }
|
||||||
|
style = { level = "warn", priority = -1 }
|
||||||
|
suspicious = { level = "warn", priority = -1 }
|
||||||
|
|
||||||
|
# allow following lints
|
||||||
collapsible_if = "allow"
|
collapsible_if = "allow"
|
||||||
needless_pass_by_value = "allow"
|
needless_pass_by_value = "allow"
|
||||||
nonminimal_bool = "allow"
|
nonminimal_bool = "allow"
|
||||||
redundant_pattern_matching = "allow"
|
redundant_pattern_matching = "allow"
|
||||||
|
# () makes a fine error in most cases
|
||||||
|
result_unit_err = "allow"
|
||||||
|
# We don't expose public APIs that matter like this
|
||||||
|
len_without_is_empty = "allow"
|
||||||
|
# We currently prefer explicit control flow return over `...?;` statements whose result is unused
|
||||||
|
question_mark = "allow"
|
||||||
|
# We have macros that rely on this currently
|
||||||
|
enum_variant_names = "allow"
|
||||||
|
# Builder pattern disagrees
|
||||||
|
new_ret_no_self = "allow"
|
||||||
|
non_canonical_clone_impl = "allow"
|
||||||
|
non_canonical_partial_ord_impl = "allow"
|
||||||
|
format_collect = "allow"
|
||||||
|
|
||||||
|
# Following lints should be tackled at some point
|
||||||
|
too_many_arguments = "allow"
|
||||||
|
type_complexity = "allow"
|
||||||
|
|
||||||
|
# warn at following lints
|
||||||
|
dbg_macro = "warn"
|
||||||
|
todo = "warn"
|
||||||
|
unimplemented = "warn"
|
||||||
|
rc_buffer = "warn"
|
||||||
|
# FIXME enable this, we use this pattern a lot so its annoying work ...
|
||||||
|
# str_to_string = "warn"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user