mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-26 07:39:58 +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
|
# * `-A unknown_lints` – do not warn about unknown lint suppressions
|
||||||
# that people with newer toolchains might use
|
# that people with newer toolchains might use
|
||||||
# * `-D warnings` - fail on any warnings (`cargo` returns non-zero exit status)
|
# * `-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 std::ffi::CString;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|||||||
@@ -38,12 +38,6 @@ enum Command {
|
|||||||
|
|
||||||
/// Print stats and anomalies about the traces
|
/// Print stats and anomalies about the traces
|
||||||
Analyze,
|
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.
|
// 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);
|
analyze_trace(reader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Command::Draw => todo!(),
|
|
||||||
Command::Replay => todo!(),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user