Skip to content

Commit

Permalink
move lints configuration from lib.rs to Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen-lg committed Jul 12, 2024
1 parent 18dc4d4 commit 7a8c86b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
24 changes: 24 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ maintenance = { status = "actively-developed" }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lints.rust]
missing_docs = "deny"
unused_imports = "deny"

[lints.clippy]
cargo = { priority = -1, level = "warn" }
complexity = { priority = -1, level = "deny" }
Expand All @@ -29,6 +33,26 @@ perf = { priority = -1, level = "deny" }
# restriction = { priority = -1, level = "deny" }
style = { priority = -1, level = "deny" }
# suspicious = { priority = -1, level = "deny" }
bind_instead_of_map = "deny"
borrowed_box = "deny"
cast_lossless = "deny"
clone_on_copy = "deny"
derive_partial_eq_without_eq = "deny"
doc_markdown = "deny"
extra_unused_lifetimes = "deny"
if_not_else = "deny"
match_same_arms = "deny"
missing_const_for_fn = "deny"
missing_errors_doc = "deny"
missing_fields_in_debug = "deny"
missing_panics_doc = "deny"
must_use_candidate = "deny"
or_fun_call = "deny"
trivially_copy_pass_by_ref = "deny"
uninlined_format_args = "deny"
use_self = "deny"
unreadable_literal = "deny"
useless_conversion = "deny"

[dependencies]
cast = "0.3"
Expand Down
22 changes: 0 additions & 22 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@
//! Your feedback and contributions are welcome! Please see
//! [Subtile](https://github.com/gwen-lg/subtile) on GitHub for details.
#![deny(missing_docs)]
#![deny(unused_imports)]
#![deny(clippy::bind_instead_of_map)]
#![deny(clippy::borrowed_box)]
#![deny(clippy::cast_lossless)]
#![deny(clippy::clone_on_copy)]
#![deny(clippy::derive_partial_eq_without_eq)]
#![deny(clippy::doc_markdown)]
#![deny(clippy::extra_unused_lifetimes)]
#![deny(clippy::if_not_else)]
#![deny(clippy::match_same_arms)]
#![deny(clippy::missing_const_for_fn)]
#![deny(clippy::missing_errors_doc)]
#![deny(clippy::missing_fields_in_debug)]
#![deny(clippy::missing_panics_doc)]
#![deny(clippy::must_use_candidate)]
#![deny(clippy::or_fun_call)]
#![deny(clippy::trivially_copy_pass_by_ref)]
#![deny(clippy::uninlined_format_args)]
#![deny(clippy::use_self)]
#![deny(clippy::unreadable_literal)]
#![deny(clippy::useless_conversion)]
// For error-chain.
#![recursion_limit = "1024"]

Expand Down

0 comments on commit 7a8c86b

Please sign in to comment.