From 76a4d8aa4c20d1f038474e0bac89f284cf091b3c Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 3 Jun 2024 06:54:58 +0000 Subject: [PATCH] additional clippy configuration these are documentary values seeking review, not final standards set for the project. Signed-off-by: Jason Volk --- Cargo.toml | 5 ++--- clippy.toml | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 254b6513..e78382c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -645,7 +645,7 @@ incremental = false [workspace.lints.rust] absolute-paths-not-starting-with-crate = "warn" -#box-pointers = "warn" # TODO +#box-pointers = "warn" deprecated-in-future = "warn" elided-lifetimes-in-paths = "warn" explicit-outlives-requirements = "warn" @@ -711,9 +711,8 @@ correctness = "warn" ################### nursery = "warn" -### some sadness +## some sadness branches_sharing_code = { level = "allow", priority = 1 } # TODO -cognitive_complexity = { level = "allow", priority = 1 } # TODO derive_partial_eq_without_eq = { level = "allow", priority = 1 } # TODO equatable_if_let = { level = "allow", priority = 1 } # TODO future_not_send = { level = "allow", priority = 1 } # TODO diff --git a/clippy.toml b/clippy.toml index afa92de4..0a04ecd2 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1,7 @@ -too-many-lines-threshold = 700 +array-size-threshold = 4096 +cognitive-complexity-threshold = 94 # TODO reduce me ALARA +excessive-nesting-threshold = 11 # TODO reduce me to 4 or 5 +future-size-threshold = 7745 # TODO reduce me ALARA +stack-size-threshold = 178030 # reduce me ALARA +too-many-lines-threshold = 700 # TODO reduce me to <= 100 +type-complexity-threshold = 250 # reduce me to ~200