fix(workspace): clear strict lint and test debt

This commit is contained in:
slhx agent
2026-07-13 08:59:48 +02:00
parent d0e7022c86
commit 65895d8b83
10 changed files with 49 additions and 26 deletions
+4 -4
View File
@@ -722,10 +722,9 @@ fn component_contract_errors(
let implemented = component_handler_names(items);
let mut errors = Vec::new();
if component.is_some() && !implemented.is_empty() && generated.is_empty() {
if let Some(component) = component.filter(|_| !implemented.is_empty() && generated.is_empty()) {
errors.push(format!(
"#[hemx::component({:?})] does not match any generated handles; check the .heml file name or component name",
component.unwrap()
"#[hemx::component({component:?})] does not match any generated handles; check the .heml file name or component name"
));
}
@@ -787,7 +786,8 @@ fn duplicate_names(names: &[String]) -> Vec<String> {
}
counts
.into_iter()
.filter_map(|(name, count)| (count > 1).then(|| name.to_owned()))
.filter(|(_, count)| *count > 1)
.map(|(name, _)| name.to_owned())
.collect()
}
+10 -1
View File
@@ -982,7 +982,9 @@ fn check_fixture(fixture: &Fixture) -> std::process::Output {
.arg("--quiet")
.arg("--manifest-path")
.arg(fixture.path.join("Cargo.toml"))
.env("CARGO_TARGET_DIR", fixture.path.join("target"))
// Cargo serializes access to a shared target directory, so all fixtures reuse
// the same compiled hemx dependency graph instead of rebuilding it per test.
.env("CARGO_TARGET_DIR", fixture_target_dir())
.output()
.expect("cargo check fixture runs")
}
@@ -994,6 +996,13 @@ fn repo_path(crate_name: &str) -> PathBuf {
.join(crate_name)
}
fn fixture_target_dir() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.expect("crate has workspace parent")
.join("target/compile-fixtures")
}
struct Fixture {
path: PathBuf,
}