Skip to content

chore: ban panic/expect/unwrap in production code via clippy - #123

Merged
joshstevens19 merged 2 commits into
masterfrom
joshstevens19/clippy-ban-panic-expect
Aug 9, 2026
Merged

joshstevens19 merged 2 commits into
masterfrom
joshstevens19/clippy-ban-panic-expect

Conversation

@joshstevens19

Copy link
Copy Markdown
Owner

Adds workspace-level clippy lints denying unwrap_used, expect_used, panic, todo, unimplemented, and unreachable, enforced as compile errors in the core, cli, and sdk crates (e2e-tests and playground are intentionally excluded). A root clippy.toml exempts #[cfg(test)] code so unit tests stay idiomatic. All ~40 violating call sites are replaced with proper error propagation or logged fallbacks — notably the CacheValue converters now degrade to a cache miss instead of killing the process, relayer wallet creation rolls back its DB transaction on failure, and transaction-replace validates blob hex before mutating state. Verified with cargo clippy --all-targets (clean), cargo fmt --check, workspace-wide cargo check, and passing unit tests.

🤖 Generated with Claude Code

joshstevens19 and others added 2 commits August 9, 2026 12:45
Add workspace-level clippy lints (unwrap_used, expect_used, panic, todo,
unimplemented, unreachable) enforced as errors in core, cli and sdk, with
test-code exemptions via clippy.toml. Replace all violating call sites with
proper error propagation or logged fallbacks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joshstevens19
joshstevens19 merged commit dc8a406 into master Aug 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant