fix: remove unused assignment and import warnings in tests
All checks were successful
CI / Check / Test (push) Successful in 2m51s
Architecture Docs / Generate diagrams (push) Successful in 3m36s

This commit is contained in:
2026-06-17 10:34:53 +02:00
parent f780a66c3a
commit c4fb1ed699
22 changed files with 1767 additions and 5 deletions

6
docs/arch/d2/module.d2 Normal file
View File

@@ -0,0 +1,6 @@
Adapters: Adapters
Domain: Domain
Application: Application
Presentation: Presentation
Application -> Domain
Adapters -> Domain

41
docs/arch/d2/project.d2 Normal file
View File

@@ -0,0 +1,41 @@
Adapters: {
archlens_tree_sitter: archlens-tree-sitter
archlens_walkdir: archlens-walkdir
archlens_mermaid: archlens-mermaid
archlens_ascii: archlens-ascii
archlens_file_writer: archlens-file-writer
archlens_stdout_writer: archlens-stdout-writer
archlens_toml_config: archlens-toml-config
archlens_cargo_workspace: archlens-cargo-workspace
archlens_python_project: archlens-python-project
archlens_d2: archlens-d2
archlens_html: archlens-html
}
archlens_domain: archlens-domain
archlens_application: archlens-application
archlens: archlens
archlens_application -> archlens_domain
archlens -> archlens_domain
archlens -> archlens_file_writer
archlens -> archlens_mermaid
archlens -> archlens_html
archlens -> archlens_python_project
archlens -> archlens_walkdir
archlens -> archlens_ascii
archlens -> archlens_toml_config
archlens -> archlens_stdout_writer
archlens -> archlens_application
archlens -> archlens_d2
archlens -> archlens_tree_sitter
archlens -> archlens_cargo_workspace
archlens_tree_sitter -> archlens_domain
archlens_walkdir -> archlens_domain
archlens_mermaid -> archlens_domain
archlens_ascii -> archlens_domain
archlens_file_writer -> archlens_domain
archlens_stdout_writer -> archlens_domain
archlens_toml_config -> archlens_domain
archlens_cargo_workspace -> archlens_domain
archlens_python_project -> archlens_domain
archlens_d2 -> archlens_domain
archlens_html -> archlens_domain

448
docs/arch/d2/type.d2 Normal file
View File

@@ -0,0 +1,448 @@
Domain: {
Relationship: {
shape: class
source: String
target: String
kind: RelationshipKind
source_file: Option
new()
with_source_file()
source()
target()
kind()
source_file()
}
CodeElement: {
shape: class
name: String
qualified_name: Option
kind: CodeElementKind
file_path: FilePath
line: usize
visibility: Visibility
module: Option
generics: Vec
attributes: Vec
fields: Vec
methods: Vec
new()
with_visibility()
with_module()
with_generics()
with_attributes()
with_qualified_name()
name()
qualified_name()
kind()
file_path()
line()
visibility()
module()
generics()
attributes()
with_fields()
with_methods()
fields()
methods()
}
DomainError: {
shape: class
}
DiagramRenderer: {
shape: class
}
SourceAnalyzer: {
shape: class
}
ConfigLoader: {
shape: class
}
FileDiscovery: {
shape: class
}
ProjectAnalyzer: {
shape: class
}
OutputWriter: {
shape: class
}
AnalysisResult: {
shape: class
elements: Vec
relationships: Vec
warnings: Vec
new()
empty()
elements()
relationships()
warnings()
}
AnalysisConfig: {
shape: class
excludes: Vec
level: DiagramLevel
module_mappings: HashMap
scope: Option
include_tests: bool
changed_files: Option
with_excludes()
with_level()
with_module_mappings()
excludes()
level()
with_scope()
module_mappings()
scope()
with_include_tests()
include_tests()
with_changed_files()
changed_files()
}
AnalysisWarning: {
shape: class
file_path: FilePath
line: usize
message: String
new()
file_path()
line()
message()
}
CodeElementKind: {
shape: class
}
RelationshipKind: {
shape: class
}
Visibility: {
shape: class
}
DiagramLevel: {
shape: class
}
OutputConfig: {
shape: class
split_by_module: bool
output_path: Option
with_split_by_module()
with_output_path()
split_by_module()
output_path()
}
RenderedFile: {
shape: class
name: String
content: String
new()
name()
content()
}
RenderOutput: {
shape: class
files: Vec
new()
single()
files()
}
ModuleName: {
shape: class
new()
from_path()
from_directory_group()
capitalize()
as_str()
}
Language: {
shape: class
name()
}
SourceFile: {
shape: class
path: FilePath
language: Language
new()
path()
language()
}
FilePath: {
shape: class
new()
as_str()
}
RuleKind: {
shape: class
}
RuleViolation: {
shape: class
source_module: String
target_module: String
kind: RuleKind
new()
source_module()
target_module()
kind()
message()
}
BoundaryRule: {
shape: class
source: String
target: String
parse()
source()
target()
matches()
}
CodeGraph: {
shape: class
elements: Vec
relationships: Vec
new()
add_element()
add_relationship()
elements()
relationships()
modules()
elements_by_module()
resolve_relationships()
filter_external_imports()
qualify()
cross_module_deps_for()
subgraph_by_module()
}
}
Adapters: {
AsciiRenderer: {
shape: class
new()
format_kind()
}
D2Renderer: {
shape: class
level: DiagramLevel
new()
with_level()
}
CargoWorkspaceAnalyzer: {
shape: class
new()
}
WorkspaceToml: {
shape: class
workspace: Option
}
WorkspaceSection: {
shape: class
members: Vec
}
MemberToml: {
shape: class
package: Option
dependencies: HashMap
}
PackageSection: {
shape: class
name: String
}
PythonProjectAnalyzer: {
shape: class
new()
}
ProjectSection: {
shape: class
name: Option
dependencies: Vec
}
PoetrySection: {
shape: class
name: Option
dependencies: HashMap
}
ToolSection: {
shape: class
poetry: PoetrySection
}
PyprojectToml: {
shape: class
project: Option
tool: ToolSection
}
StdoutOutputWriter: {
shape: class
new()
}
FileOutputWriter: {
shape: class
output_path: OutputPath
new()
single_file()
}
OutputPath: {
shape: class
}
MermaidRenderer: {
shape: class
level: DiagramLevel
show_weights: bool
new()
with_level()
with_weights()
display_name()
format_element_name()
format_visibility()
render_class_diagram()
push_class_lines()
render_module_flowchart()
render_project_flowchart()
sanitize_id()
}
LanguageExtractor: {
shape: class
}
TreeSitterAnalyzer: {
shape: class
rust: RustExtractor
python: PythonExtractor
new()
extractor_for()
}
RustExtractor: {
shape: class
}
PythonExtractor: {
shape: class
}
WalkdirDiscovery: {
shape: class
new()
detect_language()
is_test_file()
is_excluded()
}
HtmlRenderer: {
shape: class
new()
}
GraphData: {
shape: class
nodes: Vec
edges: Vec
}
NodeData: {
shape: class
id: String
label: String
module: String
kind: String
fields: Vec
methods: Vec
}
EdgeData: {
shape: class
source: String
target: String
kind: String
}
RawRules: {
shape: class
allow: Vec
deny: Vec
}
RawConfig: {
shape: class
analysis: RawAnalysis
output: RawOutput
modules: HashMap
rules: RawRules
}
RawAnalysis: {
shape: class
exclude: Vec
level: Option
}
RawOutput: {
shape: class
format: Option
path: Option
split_by_module: bool
}
TomlConfigLoader: {
shape: class
raw: RawConfig
from_path()
parse_level()
}
}
Application: {
AnalyzeCodebase: {
shape: class
file_discovery: F
source_analyzer: S
new()
execute()
}
AnalyzeCodebaseResult: {
shape: class
graph: CodeGraph
warnings: Vec
graph()
warnings()
}
}
Presentation: {
Cli: {
shape: class
command: Option
path: PathBuf
level: String
format: String
output: Option
config: Option
scope: Option
exclude: Vec
include_tests: bool
no_weights: bool
watch: bool
since: Option
split_by_module: bool
strict: bool
check: bool
verbose: u8
}
Command: {
shape: class
}
}
Adapters_AsciiRenderer -> Domain_DiagramRenderer: {style.stroke-dash: 0}
Adapters_D2Renderer -> Domain_DiagramLevel
Adapters_D2Renderer -> Domain_DiagramRenderer: {style.stroke-dash: 0}
Adapters_CargoWorkspaceAnalyzer -> Domain_ProjectAnalyzer: {style.stroke-dash: 0}
Adapters_ToolSection -> Adapters_PoetrySection
Adapters_PyprojectToml -> Adapters_ToolSection
Adapters_PythonProjectAnalyzer -> Domain_ProjectAnalyzer: {style.stroke-dash: 0}
Adapters_StdoutOutputWriter -> Domain_OutputWriter: {style.stroke-dash: 0}
Adapters_FileOutputWriter -> Adapters_OutputPath
Adapters_FileOutputWriter -> Domain_OutputWriter: {style.stroke-dash: 0}
Adapters_MermaidRenderer -> Domain_DiagramLevel
Adapters_MermaidRenderer -> Domain_DiagramRenderer: {style.stroke-dash: 0}
Adapters_TreeSitterAnalyzer -> Adapters_RustExtractor
Adapters_TreeSitterAnalyzer -> Adapters_PythonExtractor
Adapters_TreeSitterAnalyzer -> Domain_SourceAnalyzer: {style.stroke-dash: 0}
Adapters_RustExtractor -> Adapters_LanguageExtractor: {style.stroke-dash: 0}
Adapters_PythonExtractor -> Adapters_LanguageExtractor: {style.stroke-dash: 0}
Adapters_WalkdirDiscovery -> Domain_FileDiscovery: {style.stroke-dash: 0}
Adapters_HtmlRenderer -> Domain_DiagramRenderer: {style.stroke-dash: 0}
Adapters_RawConfig -> Adapters_RawAnalysis
Adapters_RawConfig -> Adapters_RawOutput
Adapters_RawConfig -> Adapters_RawRules
Adapters_TomlConfigLoader -> Adapters_RawConfig
Adapters_TomlConfigLoader -> Domain_ConfigLoader: {style.stroke-dash: 0}
Application_AnalyzeCodebaseResult -> Domain_CodeGraph
Domain_Relationship -> Domain_RelationshipKind
Domain_CodeElement -> Domain_CodeElementKind
Domain_CodeElement -> Domain_FilePath
Domain_CodeElement -> Domain_Visibility
Domain_AnalysisConfig -> Domain_DiagramLevel
Domain_AnalysisWarning -> Domain_FilePath
Domain_SourceFile -> Domain_FilePath
Domain_SourceFile -> Domain_Language
Domain_RuleViolation -> Domain_RuleKind