axm-audit
Code auditing and quality rules for Python projects.
What it does
axm-audit is a Python library and CLI that audits project quality across 10 scored categories, producing a composite 0โ100 score:
| Category | Tool | Weight |
|---|---|---|
| Linting | Ruff | 20% |
| Type Safety | mypy | 15% |
| Complexity | radon | 15% |
| Security | Bandit | 10% |
| Dependencies | pip-audit + deptry | 10% |
| Testing | pytest-cov | 15% |
| Architecture | AST analysis | 10% |
| Practices | AST analysis | 5% |
Quick Example
# Python API
from pathlib import Path
from axm_audit import audit_project
result = audit_project(Path("."))
print(f"Grade: {result.grade} โ {result.quality_score:.1f}/100")
# Grade: A โ 95.0/100
Features
- ๐ Linting โ Ruff analysis (800+ rules)
- ๐ Type Safety โ Strict mypy (per-project
pyproject.tomlconfig) - ๐ Complexity โ Cyclomatic complexity via radon (Python API with subprocess fallback)
- ๐ก๏ธ Security โ Bandit integration + hardcoded secrets detection
- ๐ฆ Dependencies โ Vulnerability scanning (pip-audit) + hygiene (deptry)
- ๐งช Testing โ Coverage enforcement via pytest-cov
- ๐๏ธ Architecture โ Circular imports, god classes, coupling metrics, duplication detection
- ๐ Practices โ Docstring coverage, bare except detection, blocking I/O, logging presence, test mirroring
- ๐ง Tooling โ CLI tool availability checks
- โก Fast & Typed โ Direct Python APIs, strict mypy, 429 tests, 93% coverage