Use workspace lint configuration instead of rustflags hack
This commit is contained in:
parent
7051892077
commit
1a138ed6c9
@ -4,40 +4,5 @@ xtask = "run --package xtask --"
|
||||
[doc.extern-map.registries]
|
||||
crates-io = "https://docs.rs/"
|
||||
|
||||
[target.'cfg(all())']
|
||||
rustflags = [
|
||||
"-Wrust_2018_idioms",
|
||||
"-Wsemicolon_in_expressions_from_macros",
|
||||
"-Wunreachable_pub",
|
||||
"-Wunused_import_braces",
|
||||
"-Wunused_qualifications",
|
||||
"-Wclippy::branches_sharing_code",
|
||||
"-Wclippy::cloned_instead_of_copied",
|
||||
"-Wclippy::dbg_macro",
|
||||
"-Wclippy::disallowed_types",
|
||||
"-Wclippy::empty_line_after_outer_attr",
|
||||
"-Wclippy::exhaustive_enums",
|
||||
"-Wclippy::exhaustive_structs",
|
||||
"-Wclippy::inefficient_to_string",
|
||||
"-Wclippy::macro_use_imports",
|
||||
"-Wclippy::map_flatten",
|
||||
"-Wclippy::missing_enforced_import_renames",
|
||||
# Disabled because it triggers for tests/foo/mod.rs which can't be replaced
|
||||
# easily. Locally allowing it also doesn't seem to work.
|
||||
#"-Wclippy::mod_module_files",
|
||||
"-Wclippy::mut_mut",
|
||||
"-Aclippy::new_without_default",
|
||||
"-Wclippy::nonstandard_macro_braces",
|
||||
"-Wclippy::semicolon_if_nothing_returned",
|
||||
"-Wclippy::str_to_string",
|
||||
"-Wclippy::todo",
|
||||
"-Wclippy::unreadable_literal",
|
||||
"-Wclippy::unseparated_literal_suffix",
|
||||
"-Wclippy::wildcard_imports",
|
||||
# Disabled temporarily because it triggers false positives for types with
|
||||
# generics.
|
||||
"-Aclippy::arc_with_non_send_sync",
|
||||
]
|
||||
|
||||
[unstable]
|
||||
rustdoc-map = true
|
||||
|
34
Cargo.toml
34
Cargo.toml
@ -40,6 +40,40 @@ tracing = { version = "0.1.37", default-features = false, features = ["std"] }
|
||||
url = { version = "2.5.0" }
|
||||
web-time = "1.1.0"
|
||||
|
||||
[workspace.lints.rust]
|
||||
rust_2018_idioms = { level = "warn", priority = -1 }
|
||||
semicolon_in_expressions_from_macros = "warn"
|
||||
unreachable_pub = "warn"
|
||||
unused_import_braces = "warn"
|
||||
unused_qualifications = "warn"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
branches_sharing_code = "warn"
|
||||
cloned_instead_of_copied = "warn"
|
||||
dbg_macro = "warn"
|
||||
disallowed_types = "warn"
|
||||
empty_line_after_outer_attr = "warn"
|
||||
exhaustive_enums = "warn"
|
||||
exhaustive_structs = "warn"
|
||||
inefficient_to_string = "warn"
|
||||
macro_use_imports = "warn"
|
||||
map_flatten = "warn"
|
||||
missing_enforced_import_renames = "warn"
|
||||
mod_module_files = "warn"
|
||||
mut_mut = "warn"
|
||||
nonstandard_macro_braces = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
str_to_string = "warn"
|
||||
todo = "warn"
|
||||
unreadable_literal = "warn"
|
||||
unseparated_literal_suffix = "warn"
|
||||
wildcard_imports = "warn"
|
||||
|
||||
# Not that good of a lint
|
||||
new_without_default = "allow"
|
||||
# Disabled temporarily because it triggers false positives for types with generics.
|
||||
arc_with_non_send_sync = "allow"
|
||||
|
||||
[profile.dev]
|
||||
# Speeds up test times by more than 10% in a simple test
|
||||
# Set to 1 or 2 if you want to use a debugger in this workspace
|
||||
|
@ -32,3 +32,6 @@ serde_json = { workspace = true }
|
||||
[dev-dependencies]
|
||||
assert_matches2 = { workspace = true }
|
||||
serde_yaml = "0.9.14"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -72,3 +72,6 @@ web-time = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches2 = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -50,3 +50,6 @@ tracing = { version = "0.1.30", default-features = false, features = ["std"] }
|
||||
[dev-dependencies]
|
||||
ruma-client-api = { workspace = true, features = ["client"] }
|
||||
tokio-stream = "0.1.8"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -87,3 +87,6 @@ assert_matches2 = { workspace = true }
|
||||
assign = { workspace = true }
|
||||
maplit = { workspace = true }
|
||||
trybuild = "1.0.71"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -93,3 +93,6 @@ trybuild = "1.0.71"
|
||||
name = "event_deserialize"
|
||||
harness = false
|
||||
required-features = ["criterion"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -45,3 +45,6 @@ serde_json = { workspace = true }
|
||||
[dev-dependencies]
|
||||
assert_matches2 = { workspace = true }
|
||||
http = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -26,3 +26,6 @@ wildmatch = "2.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches2 = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -25,3 +25,6 @@ compat-user-id = []
|
||||
[dependencies]
|
||||
js_int = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -25,3 +25,6 @@ serde = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -30,3 +30,6 @@ ruma-identifiers-validation = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
syn = { version = "2.0.2", features = ["extra-traits", "full", "visit"] }
|
||||
toml = { version = "0.8.2", default-features = false, features = ["parse"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -25,3 +25,6 @@ ruma-common = { workspace = true, features = ["api"] }
|
||||
ruma-events = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -24,3 +24,6 @@ tracing = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3.16"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -33,3 +33,6 @@ thiserror = { workspace = true }
|
||||
[dev-dependencies]
|
||||
assert_matches2 = { workspace = true }
|
||||
insta = "1.31.0"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -40,3 +40,6 @@ tracing-subscriber = "0.3.16"
|
||||
name = "state_res_bench"
|
||||
harness = false
|
||||
required-features = ["criterion"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -310,3 +310,6 @@ ruma-push-gateway-api = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -17,3 +17,6 @@ serde_json = { workspace = true }
|
||||
toml = { version = "0.8.2", default-features = false, features = ["parse"] }
|
||||
toml_edit = { version = "0.20.2", optional = true }
|
||||
xshell = "0.1.17"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user