kindelia / Kindelia

An efficient, secure cryptocomputer
https://kindelia.org/
609 stars 38 forks source link

style(clippy): disallow panics under kindelia/src #275

Closed dan-da closed 1 year ago

dan-da commented 1 year ago

Addressing #247

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

It will therefore cause CI clippy check to fail if these are encountered.

Of course, the code may override with a #[allow(clippy::unwrap_used)]. So this is really just changing the default from allow to deny.

test cases are not affected. (panics are allowed)

Note that there are several ways to configure clippy lints. Once we've removed all the panics that we can, it will probably be best to apply these lints for the entire repo/workspace. But for now, this seems the simplest, and it applies to only non-test code in the kindelia crate which has already been scrubbed of unwrap, expect, panic.

dan-da commented 1 year ago

Ok, I changed it from deny to warn.