Skip to content

Commit 189dddb

Browse files
committed
Reach cache_env and hermetic through common
Nine standalone e2e suites now include common/mod.rs, which already declares cache_env and hermetic, yet still loaded those two files a second time through their own #[path] mods (clippy::duplicate_mod under --all-targets). They take common's modules instead. Assisted-by: Claude Code:claude-opus-5-5
1 parent bad5ac2 commit 189dddb

9 files changed

Lines changed: 10 additions & 20 deletions

‎crates/socket-patch-cli/tests/e2e_gem.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ use std::process::{Command, Output};
2828
use wiremock::matchers::{method, path_regex};
2929
use wiremock::{Mock, MockServer, ResponseTemplate};
3030

31-
#[path = "common/cache_env.rs"]
32-
mod cache_env;
31+
use common::cache_env;
3332

3433
// ---------------------------------------------------------------------------
3534
// Constants

‎crates/socket-patch-cli/tests/e2e_npm.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ use common::{binary, git_sha256};
2020
use std::path::Path;
2121
use std::process::{Command, Output};
2222

23-
#[path = "common/cache_env.rs"]
24-
mod cache_env;
23+
use common::cache_env;
2524

2625
// ---------------------------------------------------------------------------
2726
// Constants

‎crates/socket-patch-cli/tests/e2e_pypi.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use std::process::{Command, Output};
2222

2323
use socket_patch_cli::args::{GLOBAL_ARG_ENV_VARS, LOCAL_ARG_ENV_VARS};
2424

25-
#[path = "common/cache_env.rs"]
26-
mod cache_env;
25+
use common::cache_env;
2726

2827
// ---------------------------------------------------------------------------
2928
// Constants

‎crates/socket-patch-cli/tests/e2e_redirect_gem_build.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ use wiremock::{Mock, MockServer, ResponseTemplate};
110110

111111
#[path = "common/bundler_e2e.rs"]
112112
mod bundler_e2e;
113-
#[path = "common/cache_env.rs"]
114-
mod cache_env;
113+
use common::cache_env;
115114
#[path = "vex_e2e_common/mod.rs"]
116115
mod vex_e2e_common;
117116

‎crates/socket-patch-cli/tests/e2e_redirect_gradle_build.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
mod common;
2323
use common::git_sha256;
2424

25-
#[path = "common/hermetic.rs"]
26-
mod hermetic;
25+
use common::hermetic;
2726
#[path = "prebuilt_common/mod.rs"]
2827
mod prebuilt_common;
2928

‎crates/socket-patch-cli/tests/e2e_scan.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ use common::{binary, git_sha256};
3434
use std::path::Path;
3535
use std::process::{Command, Output};
3636

37-
#[path = "common/cache_env.rs"]
38-
mod cache_env;
37+
use common::cache_env;
3938

4039
// ---------------------------------------------------------------------------
4140
// Constants (shared with e2e_npm; duplicated here because Rust integration

‎crates/socket-patch-cli/tests/e2e_vendor_composer_build.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ use std::process::{Command, Output};
7171
use wiremock::matchers::{method, path, path_regex};
7272
use wiremock::{Mock, MockServer, ResponseTemplate};
7373

74-
#[path = "common/cache_env.rs"]
75-
mod cache_env;
74+
use common::cache_env;
7675
#[path = "composer_e2e_common/mod.rs"]
7776
mod composer_e2e_common;
7877
#[path = "vex_e2e_common/mod.rs"]

‎crates/socket-patch-cli/tests/e2e_vendor_pnpm_build.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ use sha2::Digest;
7676
use wiremock::matchers::{method, path};
7777
use wiremock::{Mock, MockServer, ResponseTemplate};
7878

79-
#[path = "common/cache_env.rs"]
80-
mod cache_env;
81-
#[path = "common/hermetic.rs"]
82-
mod hermetic;
79+
use common::cache_env;
80+
use common::hermetic;
8381
#[path = "vex_e2e_common/mod.rs"]
8482
mod vex_e2e_common;
8583
use vex_e2e_common::{

‎crates/socket-patch-cli/tests/e2e_vendor_pypi_build.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ use std::process::{Command, Output};
6767
use wiremock::matchers::{method, path};
6868
use wiremock::{Mock, MockServer, ResponseTemplate};
6969

70-
#[path = "common/cache_env.rs"]
71-
mod cache_env;
70+
use common::cache_env;
7271
#[path = "vex_e2e_common/uv.rs"]
7372
mod uv_vex;
7473
#[path = "vex_e2e_common/mod.rs"]

0 commit comments

Comments
 (0)