|
1 | 1 | //! Capture analysis tool for lading capture files. |
2 | 2 |
|
3 | 3 | #![expect(clippy::print_stdout)] |
4 | | -// Quarantine: workspace denies `clippy::expect_used`, but this binary still has |
5 | | -// production `.expect()` sites awaiting cleanup. Remove once cleaned up. |
6 | | -#![allow(clippy::expect_used)] |
7 | 4 |
|
8 | 5 | mod analyze; |
9 | 6 |
|
@@ -75,6 +72,10 @@ pub enum Error { |
75 | 72 |
|
76 | 73 | #[tokio::main(flavor = "current_thread")] |
77 | 74 | #[expect(clippy::too_many_lines)] |
| 75 | +#[expect( |
| 76 | + clippy::expect_used, |
| 77 | + reason = "FIXME: line read and JSON deserialization should surface as Error variants rather than panicking; tracked for follow-up. Task join panics are intentional propagation of inner panics." |
| 78 | +)] |
78 | 79 | async fn main() -> Result<(), Error> { |
79 | 80 | tracing_subscriber::fmt() |
80 | 81 | .with_span_events(FmtSpan::FULL) |
@@ -230,6 +231,10 @@ async fn main() -> Result<(), Error> { |
230 | 231 | Ok(()) |
231 | 232 | } |
232 | 233 |
|
| 234 | +#[expect( |
| 235 | + clippy::expect_used, |
| 236 | + reason = "FIXME: line read and JSON deserialization should surface as Error variants rather than panicking; tracked for follow-up. Task join panics are intentional propagation of inner panics." |
| 237 | +)] |
233 | 238 | async fn validate_capture(capture_path_str: &str, min_seconds: Option<u64>) -> Result<(), Error> { |
234 | 239 | let capture_path = path::Path::new(capture_path_str); |
235 | 240 | if !capture_path.exists() { |
@@ -286,6 +291,10 @@ async fn validate_capture(capture_path_str: &str, min_seconds: Option<u64>) -> R |
286 | 291 | report_validation_result(&result, min_seconds) |
287 | 292 | } |
288 | 293 |
|
| 294 | +#[expect( |
| 295 | + clippy::expect_used, |
| 296 | + reason = "ValidationResult::first_error is Some whenever is_valid() returns false; the unreachable None branch indicates a programming error in the validator" |
| 297 | +)] |
289 | 298 | fn report_validation_result( |
290 | 299 | result: &lading_capture::validate::ValidationResult, |
291 | 300 | min_seconds: Option<u64>, |
|
0 commit comments