chore(clippy): add unwrap-used baseline

Enable clippy's unwrap_used lint at warn level, document the long-term
policy carveouts for tests and LockResult, and localize the generated
OpenAPI client exemption so the remaining warning surface is real repo
code.
This commit is contained in:
Bryan Helmkamp 2026-04-19 20:43:23 -04:00
parent 72924ba611
commit 83743de293
No known key found for this signature in database
3 changed files with 4 additions and 0 deletions

View file

@ -106,6 +106,7 @@ empty_structs_with_brackets = "warn"
disallowed_methods = "deny"
exit = "warn"
get_unwrap = "warn"
unwrap_used = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"

View file

@ -1,5 +1,7 @@
absolute-paths-max-segments = 2
absolute-paths-allowed-crates = ["std", "core", "alloc"]
allow-unwrap-in-tests = true
allow-unwrap-types = ["std::sync::LockResult"]
disallowed-methods = [
{ path = "std::thread::sleep", reason = "Prefer tokio::time::sleep on Tokio paths; document intentional blocking sleeps with #[expect(clippy::disallowed_methods, reason = \"...\")]", replacement = "tokio::time::sleep" },
{ path = "std::thread::spawn", reason = "Prefer Tokio task APIs on async paths; document intentional dedicated OS threads with #[expect(clippy::disallowed_methods, reason = \"...\")]" },

View file

@ -5,6 +5,7 @@
clippy::disallowed_methods,
clippy::disallowed_types,
clippy::needless_lifetimes,
clippy::unwrap_used,
unreachable_pub,
unused_imports,
reason = "Generated OpenAPI client code intentionally preserves codegen output."