diff --git a/Cargo.toml b/Cargo.toml index da87015..a6d5cec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,5 +19,14 @@ thiserror = "1.0.56" git = "https://github.com/Garmelon/toss.git" tag = "v0.2.2" +[workspace.lints] +rust.unsafe_code = "forbid" +rust.future_incompatible = "warn" +rust.rust_2018_idioms = "warn" +rust.unused = "warn" +rust.noop_method_call = "warn" +rust.single_use_lifetimes = "warn" +clippy.use_self = "warn" + [profile.dev.package."*"] opt-level = 3 diff --git a/cove-config/Cargo.toml b/cove-config/Cargo.toml index c05257d..296899f 100644 --- a/cove-config/Cargo.toml +++ b/cove-config/Cargo.toml @@ -11,3 +11,6 @@ serde = { workspace = true } thiserror = { workspace = true } toml = "0.8.8" + +[lints] +workspace = true diff --git a/cove-config/src/lib.rs b/cove-config/src/lib.rs index 76f56e1..086e372 100644 --- a/cove-config/src/lib.rs +++ b/cove-config/src/lib.rs @@ -1,14 +1,3 @@ -#![forbid(unsafe_code)] -// Rustc lint groups -#![warn(future_incompatible)] -#![warn(rust_2018_idioms)] -#![warn(unused)] -// Rustc lints -#![warn(noop_method_call)] -#![warn(single_use_lifetimes)] -// Clippy lints -#![warn(clippy::use_self)] - pub mod doc; mod euph; mod keys; diff --git a/cove-input/Cargo.toml b/cove-input/Cargo.toml index dd6d23d..428060f 100644 --- a/cove-input/Cargo.toml +++ b/cove-input/Cargo.toml @@ -14,3 +14,6 @@ thiserror = { workspace = true } toss = { workspace = true } edit = "0.1.5" + +[lints] +workspace = true diff --git a/cove-macro/Cargo.toml b/cove-macro/Cargo.toml index dcfc17b..bd11d13 100644 --- a/cove-macro/Cargo.toml +++ b/cove-macro/Cargo.toml @@ -11,3 +11,6 @@ syn = "2.0.48" [lib] proc-macro = true + +[lints] +workspace = true diff --git a/cove-macro/src/lib.rs b/cove-macro/src/lib.rs index 82ef61a..fd09f5f 100644 --- a/cove-macro/src/lib.rs +++ b/cove-macro/src/lib.rs @@ -1,14 +1,3 @@ -#![forbid(unsafe_code)] -// Rustc lint groups -#![warn(future_incompatible)] -#![warn(rust_2018_idioms)] -#![warn(unused)] -// Rustc lints -#![warn(noop_method_call)] -#![warn(single_use_lifetimes)] -// Clippy lints -#![warn(clippy::use_self)] - use syn::{parse_macro_input, DeriveInput}; mod document; diff --git a/cove/Cargo.toml b/cove/Cargo.toml index d1e41aa..7783bbb 100644 --- a/cove/Cargo.toml +++ b/cove/Cargo.toml @@ -45,3 +45,6 @@ features = ["bot"] git = "https://github.com/Garmelon/vault.git" tag = "v0.3.0" features = ["tokio"] + +[lints] +workspace = true diff --git a/cove/src/main.rs b/cove/src/main.rs index 5bce993..8f51b40 100644 --- a/cove/src/main.rs +++ b/cove/src/main.rs @@ -1,14 +1,3 @@ -#![forbid(unsafe_code)] -// Rustc lint groups -#![warn(future_incompatible)] -#![warn(rust_2018_idioms)] -#![warn(unused)] -// Rustc lints -#![warn(noop_method_call)] -#![warn(single_use_lifetimes)] -// Clippy lints -#![warn(clippy::use_self)] - // TODO Enable warn(unreachable_pub)? // TODO Remove unnecessary Debug impls and compare compile times // TODO Time zones other than UTC