Skip to content

chore(lint): enable clippy::panic#92

Merged
tupe12334 merged 1 commit into
mainfrom
clippy/enable-panic
Jun 26, 2026
Merged

chore(lint): enable clippy::panic#92
tupe12334 merged 1 commit into
mainfrom
clippy/enable-panic

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Summary

Enables the clippy::panic restriction lint, which forbids explicit panic!() calls in production code and encourages unreachable!() for genuinely unreachable match arms.

Closes #91

Changes

  • Cargo.toml — adds panic = "deny" to [lints.clippy], consistent with the existing dbg_macro and todo entries.
  • src/cli_tests.rs, src/issue/adhoc_tests.rs, src/issue/adhoc_env_tests.rs — replaces panic!("unexpected …") in match fallback arms with unreachable!("unexpected …"). These arms cannot be reached during a passing test; unreachable! is the semantically correct macro and is not caught by clippy::panic.

Verification

cargo clippy --tests passes with zero warnings or errors. The pre-push hook confirmed build ✓, clippy ✓, and 100 % coverage ✓.


This pull request was opened by the Clippy lint improvements → issue + PR (Rust repos) → Slack routine of moadim. CC @tupe12334

Forbids explicit panic!() calls in production code. Unreachable match
arms in tests converted to unreachable!() which is semantically precise
and not caught by this lint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tupe12334 tupe12334 merged commit 3997ea5 into main Jun 26, 2026
1 check passed
@tupe12334 tupe12334 deleted the clippy/enable-panic branch June 26, 2026 21:09
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.

Enable clippy::panic lint

1 participant