refactor: move scattered business logic into domain
Some checks failed
CI / Check / Test (push) Failing after 44s
Architecture Docs / Generate diagrams (push) Successful in 3m21s

- CodeGraph::merge_project_edges() replaces presentation-layer function
- Language::is_test_file() centralises test file detection (was in walkdir)
- AnalysisConfig::is_standard_excluded() centralises default dir exclusions (was in walkdir)
- normalize_cargo_package() / normalize_python_package() in domain replace duplicated normalisers in each adapter
- walkdir, cargo-workspace, python-project updated to call domain methods
This commit is contained in:
2026-06-17 10:58:42 +02:00
parent 428faa957c
commit e26151b4a1
10 changed files with 262 additions and 87 deletions

View File

@@ -5,7 +5,7 @@ use serde::Deserialize;
use archlens_domain::{
CodeElement, CodeElementKind, CodeGraph, DomainError, FilePath, Relationship, RelationshipKind,
ports::ProjectAnalyzer,
normalize_python_package, ports::ProjectAnalyzer,
};
pub struct PythonProjectAnalyzer;
@@ -59,7 +59,7 @@ fn extract_dep_name(dep: &str) -> &str {
}
fn normalize(name: &str) -> String {
name.to_lowercase().replace(['-', '.'], "_")
normalize_python_package(name)
}
impl ProjectAnalyzer for PythonProjectAnalyzer {