Skip to content

Commit 70a2687

Browse files
committed
chore: suppress clippy dead_code warnings for test context structs
Add #[allow(dead_code)] annotations to TestContextRepo struct and its git method to resolve false positive dead code warnings in CI pipeline. These are incorrectly detected as unused by clippy but are actually used in integration tests.
1 parent ee135b9 commit 70a2687

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/helpers/test_contexts.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub(crate) struct TestContextCli {
2323
}
2424

2525
impl TestContextCli {
26-
#[allow(dead_code)] // incorrectly detected as unused by rustc; used in tests
26+
#[allow(dead_code)] // incorrectly detected as unused by clippy; used in tests
2727
pub fn git(&self) -> Command {
2828
let mut command = Command::new("git");
2929
command.env("PATH", &*PATH_WITH_GIT_MOB);
@@ -40,13 +40,15 @@ impl TestContext for TestContextCli {
4040
}
4141
}
4242

43+
#[allow(dead_code)] // incorrectly detected as unused by clippy; used in tests
4344
pub(crate) struct TestContextRepo {
4445
git_config_global: TempPath,
4546
dir: TempDir,
4647
pub home_dir: TempDir,
4748
}
4849

4950
impl TestContextRepo {
51+
#[allow(dead_code)] // incorrectly detected as unused by clippy; used in tests
5052
pub fn git(&self) -> Command {
5153
let mut command = Command::new("git");
5254
command

0 commit comments

Comments
 (0)