Skip to content

Commit 34cc98b

Browse files
committed
fix(validation): exclude cargo-wrt and wrt-build-core from test file check
These crates legitimately contain test-related files as part of their testing infrastructure implementation, not unit test files.
1 parent d66c2c5 commit 34cc98b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

wrt-build-core/src/validation.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,18 @@ impl CodeValidator {
9696
// Walk through all Cargo.toml files to find crates
9797
let crates = self.find_workspace_crates()?;
9898

99+
// Crates that legitimately contain test-related files as part of their implementation
100+
// (not unit tests, but testing infrastructure code)
101+
let excluded_crates = ["cargo-wrt", "wrt-build-core"];
102+
99103
for crate_path in crates {
104+
// Skip excluded crates that legitimately contain test infrastructure
105+
if let Some(crate_name) = crate_path.file_name().and_then(|n| n.to_str()) {
106+
if excluded_crates.contains(&crate_name) {
107+
continue;
108+
}
109+
}
110+
100111
let src_dir = crate_path.join("src");
101112
if src_dir.exists() {
102113
self.check_directory_for_test_files(&src_dir, &mut errors)?;

0 commit comments

Comments
 (0)