Use cargo workspace lints

This commit is contained in:
Joscha 2024-04-25 20:36:14 +02:00
parent 131b581880
commit db529688e9
8 changed files with 21 additions and 33 deletions

View file

@ -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

View file

@ -11,3 +11,6 @@ serde = { workspace = true }
thiserror = { workspace = true }
toml = "0.8.8"
[lints]
workspace = true

View file

@ -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;

View file

@ -14,3 +14,6 @@ thiserror = { workspace = true }
toss = { workspace = true }
edit = "0.1.5"
[lints]
workspace = true

View file

@ -11,3 +11,6 @@ syn = "2.0.48"
[lib]
proc-macro = true
[lints]
workspace = true

View file

@ -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;

View file

@ -45,3 +45,6 @@ features = ["bot"]
git = "https://github.com/Garmelon/vault.git"
tag = "v0.3.0"
features = ["tokio"]
[lints]
workspace = true

View file

@ -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