clippy-deny the todo!() macro (#4340)

`todo!()` shouldn't slip into prod code
This commit is contained in:
Christian Schwarz
2024-06-25 20:03:27 +02:00
committed by GitHub
parent 07f21dd6b6
commit cd9a550d97
3 changed files with 4 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
# * `-A unknown_lints` do not warn about unknown lint suppressions
# that people with newer toolchains might use
# * `-D warnings` - fail on any warnings (`cargo` returns non-zero exit status)
export CLIPPY_COMMON_ARGS="--locked --workspace --all-targets -- -A unknown_lints -D warnings"
# * `-D clippy::todo` - don't let `todo!()` slip into `main`
export CLIPPY_COMMON_ARGS="--locked --workspace --all-targets -- -A unknown_lints -D warnings -D clippy::todo"

View File

@@ -1,3 +1,5 @@
#![allow(clippy::todo)]
use std::ffi::CString;
use crate::{

View File

@@ -38,12 +38,6 @@ enum Command {
/// Print stats and anomalies about the traces
Analyze,
/// Draw the traces in svg format
Draw,
/// Send the read requests to a pageserver
Replay,
}
// HACK This function will change and improve as we see what kind of analysis is useful.
@@ -167,8 +161,6 @@ fn main() -> anyhow::Result<()> {
analyze_trace(reader);
}
}
Command::Draw => todo!(),
Command::Replay => todo!(),
}
Ok(())