From cd9a550d97f5863f8c123e66d08fed6360a8c771 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Tue, 25 Jun 2024 20:03:27 +0200 Subject: [PATCH] clippy-deny the `todo!()` macro (#4340) `todo!()` shouldn't slip into prod code --- .neon_clippy_args | 3 ++- libs/walproposer/src/walproposer.rs | 2 ++ trace/src/main.rs | 8 -------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.neon_clippy_args b/.neon_clippy_args index 25e09c61a6..4db32cf35c 100644 --- a/.neon_clippy_args +++ b/.neon_clippy_args @@ -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" diff --git a/libs/walproposer/src/walproposer.rs b/libs/walproposer/src/walproposer.rs index f7b72b205f..37b1e0fa87 100644 --- a/libs/walproposer/src/walproposer.rs +++ b/libs/walproposer/src/walproposer.rs @@ -1,3 +1,5 @@ +#![allow(clippy::todo)] + use std::ffi::CString; use crate::{ diff --git a/trace/src/main.rs b/trace/src/main.rs index 049f922b6f..79e1df988d 100644 --- a/trace/src/main.rs +++ b/trace/src/main.rs @@ -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(())