diff --git a/Cranky.toml b/Cranky.toml new file mode 100644 index 0000000..f9c91ac --- /dev/null +++ b/Cranky.toml @@ -0,0 +1,39 @@ +allow = [] + +deny = [ + "clippy::complexity", + "clippy::expect_used", + "clippy::implicit_clone", + "clippy::manual_string_new", + "clippy::map_unwrap_or", + "clippy::match_same_arms", + "clippy::option_as_ref_deref", + "clippy::option_filter_map", + "clippy::option_map_unit_fn", + "clippy::or_then_unwrap", + "clippy::panic", + "clippy::range_plus_one", + "clippy::redundant_clone", + "clippy::redundant_closure_for_method_calls", + "clippy::semicolon_if_nothing_returned", + "clippy::single_match_else", + "clippy::unnecessary_cast", + "clippy::unnecessary_wraps", + "clippy::unused_self", + "clippy::unwrap_used", + "clippy::useless_asref", + "clippy::useless_conversion", + "clippy::useless_format", + "nonstandard-style", + "rust_2018_idioms", + "rust-2021-compatibility", + "trivial_casts", + "trivial_numeric_casts", + "unsafe_code", + "unused_import_braces", + "unused_lifetimes", + "unused_qualifications", + "warnings", +] + +warn = [] diff --git a/Makefile.toml b/Makefile.toml index 3b4c248..31fba34 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -11,21 +11,10 @@ description = "Check format of sources files." install_crate = { rustup_component_name = "rustfmt" } [tasks.lint-rust] -args = [ - "clippy", - "--workspace", - "--locked", - "--all-targets", - "--all-features", - "--", - "-D", - "clippy::all", - "-D", - "warnings", -] +args = ["cranky"] command = "cargo" +dependencies = ["install-clippy"] description = "Check lint of all sources files." -install_crate = { rustup_component_name = "clippy" } [tasks.lint-toml] args = ["lint"] @@ -83,6 +72,13 @@ install_crate = { rustup_component_name = "llvm-tools-preview" } [tasks.install-llvm-cov] install_crate = { crate_name = "cargo-llvm-cov", min_version = "0.5.31" } +[tasks.install-clippy] +install_crate = { rustup_component_name = "clippy", min_version = "0.1.72" } + +[tasks.intall-cranky] +dependencies = ["install-clippy"] +install_crate = { crate_name = "cargo-cranky", min_version = "0.3.0" } + [tasks.publish] args = ["publish", "--token", "${CARGO_API_TOKEN}"] command = "cargo"