Index
architecture
Architecture rules — AST-based structural analysis.
CircularImportRule
dataclass
Bases: ProjectRule
Detect circular imports via import graph + Tarjan's SCC algorithm.
Source code in packages/axm-audit/src/axm_audit/core/rules/architecture/__init__.py
rule_id
property
Unique identifier for this rule.
check(project_path)
Check for circular imports in the project.
Source code in packages/axm-audit/src/axm_audit/core/rules/architecture/__init__.py
CouplingMetricRule
dataclass
Bases: ProjectRule
Measure module coupling via fan-in/fan-out analysis.
Scores based on the number of modules whose fan-out exceeds
the threshold: score = 100 - N(over) * 5.
Source code in packages/axm-audit/src/axm_audit/core/rules/architecture/__init__.py
rule_id
property
Unique identifier for this rule.
check(project_path)
Check coupling metrics for the project.
Scans src/ for import fan-out per module and compares each
against its effective threshold (base + orchestrator bonus +
per-module overrides).
Returns a :class:CheckResult with:
text— one line per violation formatted as• {leaf_module} fo:{fan_out}/{threshold} {⚠|✘}(Nonewhen all modules pass).details— fullover_thresholdlist with FQN, fan-out, role, effective threshold, and severity.fix_hint— human-readable remediation listing.
Source code in packages/axm-audit/src/axm_audit/core/rules/architecture/__init__.py
GodClassRule
dataclass
Bases: ProjectRule
Detect god classes (too many lines or methods).
Source code in packages/axm-audit/src/axm_audit/core/rules/architecture/__init__.py
| Python | |
|---|---|
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
rule_id
property
Unique identifier for this rule.
check(project_path)
Check for god classes in the project.
Scans all classes under src/ and flags those exceeding
:attr:max_lines or :attr:max_methods.
The text field uses the compact format
• {basename}:{ClassName} {lines}L/{methods}M (one line per
violation), or None when no god classes are found.