diff --git a/CLAUDE.md b/CLAUDE.md index eedd917d..62ddc002 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1 +1,5 @@ Read [AGENTS.md](AGENTS.md) first: it is the guide for every agent and contributor working in this repository. + +New workspace crates must include `[lints] workspace = true` in `Cargo.toml` to inherit +`[workspace.lints]`. Production crate roots must declare the required crate-level lint attributes +before modules or other crate items; crate-level `//!` documentation may precede them. diff --git a/Cargo.toml b/Cargo.toml index 38d60fb2..fc0edc0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,9 @@ repository = "https://github.com/storytold/craft-launcher" unsafe_code = "forbid" [workspace.lints.clippy] +cognitive_complexity = "deny" +too_many_arguments = "deny" +wildcard_imports = "deny" dbg_macro = "warn" todo = "warn" diff --git a/clippy.toml b/clippy.toml index 287e14ed..3522a15b 100644 --- a/clippy.toml +++ b/clippy.toml @@ -5,3 +5,4 @@ allow-indexing-slicing-in-tests = true disallowed-types = [ { path = "egui::ComboBox", reason = "use craft_ui::ComboBox: egui's combo box menu can't grow back while open (egui#5225)" }, ] +cognitive-complexity-threshold = 30