refactor: move scattered business logic into domain
- 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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user