diff --git a/vdev/src/commands/complete.rs b/vdev/src/commands/complete.rs index e02834c4e6e8a..e8fed84a0fd65 100644 --- a/vdev/src/commands/complete.rs +++ b/vdev/src/commands/complete.rs @@ -14,6 +14,7 @@ pub struct Cli { } impl Cli { + #[allow(clippy::unnecessary_wraps)] pub fn exec(self) -> Result<()> { let mut cmd = RootCli::command(); let bin_name = cmd.get_name().to_string(); diff --git a/vdev/src/commands/info.rs b/vdev/src/commands/info.rs index e25992a91ab56..8c6a7e901c7f0 100644 --- a/vdev/src/commands/info.rs +++ b/vdev/src/commands/info.rs @@ -10,6 +10,7 @@ use crate::{app, config, platform}; pub struct Cli {} impl Cli { + #[allow(clippy::unnecessary_wraps)] pub fn exec(self) -> Result<()> { println!("Container tool: {}", CONTAINER_TOOL.display()); println!("Data path: {}", platform::data_dir().display()); diff --git a/vdev/src/commands/meta/starship.rs b/vdev/src/commands/meta/starship.rs index e0d3e12fd6240..f43a02a745346 100644 --- a/vdev/src/commands/meta/starship.rs +++ b/vdev/src/commands/meta/starship.rs @@ -9,6 +9,7 @@ use crate::util::CargoToml; pub struct Cli {} impl Cli { + #[allow(clippy::unnecessary_wraps)] pub fn exec(self) -> Result<()> { let mut contexts = vec![]; diff --git a/vdev/src/commands/mod.rs b/vdev/src/commands/mod.rs index 9c5f0fb2e87d9..fd4d32e5edcbe 100644 --- a/vdev/src/commands/mod.rs +++ b/vdev/src/commands/mod.rs @@ -1,3 +1,12 @@ +#![allow( + // allows print! and println! in this module for commands to output to terminal + clippy::print_stdout, + + // The cli_commands! macro generates exec() methods for all commands. Some commands + // use self while others don't, so we allow unused_self to avoid false warnings. + clippy::unused_self, +)] + use clap::Parser; use clap_verbosity_flag::{InfoLevel, Verbosity}; diff --git a/vdev/src/commands/release/channel.rs b/vdev/src/commands/release/channel.rs index 5a21e6f544cad..13a0d15fe9713 100644 --- a/vdev/src/commands/release/channel.rs +++ b/vdev/src/commands/release/channel.rs @@ -11,6 +11,7 @@ use crate::util::get_channel; pub struct Cli {} impl Cli { + #[allow(clippy::unnecessary_wraps)] pub fn exec(self) -> Result<()> { let channel = get_channel(); diff --git a/vdev/src/commands/test.rs b/vdev/src/commands/test.rs index c54c45a3429c1..d988c294aacaf 100644 --- a/vdev/src/commands/test.rs +++ b/vdev/src/commands/test.rs @@ -35,7 +35,7 @@ fn parse_env(env: Vec) -> BTreeMap> { impl Cli { pub fn exec(self) -> Result<()> { - let runner = get_agent_test_runner(self.container)?; + let runner = get_agent_test_runner(self.container); let mut args = vec!["--workspace".to_string()]; diff --git a/vdev/src/main.rs b/vdev/src/main.rs index da9bd1932033e..0b918d187ebe2 100644 --- a/vdev/src/main.rs +++ b/vdev/src/main.rs @@ -1,10 +1,4 @@ #![deny(clippy::pedantic, warnings)] -#![allow( - clippy::module_name_repetitions, - clippy::print_stdout, - clippy::unused_self, - clippy::unnecessary_wraps -)] #[macro_use] mod macros; diff --git a/vdev/src/testing/integration.rs b/vdev/src/testing/integration.rs index 47a16b51d3d10..6939fb40d7b34 100644 --- a/vdev/src/testing/integration.rs +++ b/vdev/src/testing/integration.rs @@ -103,7 +103,7 @@ impl ComposeTest { runner_name, &config.runner, compose.is_some().then_some(network_name), - )?; + ); env_config.insert("VECTOR_IMAGE".to_string(), Some(runner.image_name())); diff --git a/vdev/src/testing/runner.rs b/vdev/src/testing/runner.rs index a0c7d002460ea..ae1ebc9cd0ba6 100644 --- a/vdev/src/testing/runner.rs +++ b/vdev/src/testing/runner.rs @@ -39,11 +39,11 @@ pub enum RunnerState { Unknown, } -pub fn get_agent_test_runner(container: bool) -> Result> { +pub fn get_agent_test_runner(container: bool) -> Box { if container { - Ok(Box::new(DockerTestRunner)) + Box::new(DockerTestRunner) } else { - Ok(Box::new(LocalTestRunner)) + Box::new(LocalTestRunner) } } @@ -274,7 +274,7 @@ impl IntegrationTestRunner { integration: Option, config: &IntegrationRunnerConfig, network: Option, - ) -> Result { + ) -> Self { let mut volumes: Vec = config .volumes .iter() @@ -283,12 +283,12 @@ impl IntegrationTestRunner { volumes.push(format!("{VOLUME_TARGET}:/output")); - Ok(Self { + Self { integration, needs_docker_socket: config.needs_docker_socket, network, volumes, - }) + } } pub(super) fn ensure_network(&self) -> Result<()> {