Skip to content
1 change: 1 addition & 0 deletions vdev/src/commands/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions vdev/src/commands/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
1 change: 1 addition & 0 deletions vdev/src/commands/meta/starship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![];

Expand Down
9 changes: 9 additions & 0 deletions vdev/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
1 change: 1 addition & 0 deletions vdev/src/commands/release/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion vdev/src/commands/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn parse_env(env: Vec<String>) -> BTreeMap<String, Option<String>> {

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()];

Expand Down
6 changes: 0 additions & 6 deletions vdev/src/main.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion vdev/src/testing/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()));

Expand Down
12 changes: 6 additions & 6 deletions vdev/src/testing/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ pub enum RunnerState {
Unknown,
}

pub fn get_agent_test_runner(container: bool) -> Result<Box<dyn TestRunner>> {
pub fn get_agent_test_runner(container: bool) -> Box<dyn TestRunner> {
if container {
Ok(Box::new(DockerTestRunner))
Box::new(DockerTestRunner)
} else {
Ok(Box::new(LocalTestRunner))
Box::new(LocalTestRunner)
}
}

Expand Down Expand Up @@ -274,7 +274,7 @@ impl IntegrationTestRunner {
integration: Option<String>,
config: &IntegrationRunnerConfig,
network: Option<String>,
) -> Result<Self> {
) -> Self {
let mut volumes: Vec<String> = config
.volumes
.iter()
Expand All @@ -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<()> {
Expand Down
Loading