istio / ztunnel

The `ztunnel` component of ambient mesh
Apache License 2.0
301 stars 101 forks source link

enable deny for use of unwrap #1245

Open ilrudie opened 3 months ago

ilrudie commented 3 months ago

Consider adding

# This will deny use of unwrap on Result and Option outside of tests
unwrap_used = { level = "deny",  allow-unwrap-in-tests = "true" }

to the lints.clippy section of cargo.toml to enable denying unwrap in our code.

There are some test helpers which are not explicitly tests and will now pass. Easy enough to allow unwrap on their mod definitions though to unblock. Similar for our main fn in build.rs which is easy to resolve.

There are still ~60 uses of unwrap to resolve though so its not job done and we should reach some consensus before doing more than this exploration I think.

ilrudie commented 3 months ago

related #9