Skip to content

Commit

Permalink
style(clippy): disallow panics under kindelia/src
Browse files Browse the repository at this point in the history
Addressing issue kindelia#247.

This causes clippy to emit an error if unwrap, expect, or panic is
used in any code invoked by kindelia/src/main.rs

test cases are not affected.  (panics are allowed)
  • Loading branch information
dan-da committed Jan 3, 2023
1 parent 1ba5dd0 commit 0c6545c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kindelia/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// High assurance software should not panic.
// We flip the clippy default to deny, so you should think very
// carefully. If you absolutely cannot avoid it then it has to
// be explicitly allowed with #[allow(clippy::x)]
// See https://github.com/Kindelia/Kindelia-Chain/issues/247
#![warn(clippy::unwrap_used, clippy::expect_used, clippy::panic)]

mod cli;
mod config;
mod files;
Expand Down

0 comments on commit 0c6545c

Please sign in to comment.