mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-22 21:59:59 +00:00
clippy-deny the todo!() macro (#4340)
`todo!()` shouldn't slip into prod code
This commit is contained in:
committed by
GitHub
parent
07f21dd6b6
commit
cd9a550d97
@@ -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"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::todo)]
|
||||
|
||||
use std::ffi::CString;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user