Single-binary Rust quality scanner with 20 embedded analyzers. Zero external dependencies. Pure Rust implementation using syn AST parsing.
cargo build --release
./target/release/testtrack-rust scan .- 1.2 MB binary - no runtime dependencies
- 20 analyzers - security, performance, quality, modularity, documentation
- AST-based - proper syntax tree analysis via
syn, not regex - Self-testing - scans and tests its own source code
- bugs.md - auto-generates/removes issue report in project root
- CI-ready - exit codes, JSON output, telemetry
# Basic scan
testtrack-rust scan .
# Verbose with full paths
testtrack-rust scan . -v
# JSON output
testtrack-rust scan . --format=json
# CI mode (exit code 2 if issues found)
testtrack-rust scan . --ci
# With performance telemetry
testtrack-rust scan . --telemetry
# All options
testtrack-rust scan /path/to/project -v --telemetry --ci| # | Analyzer | Checks |
|---|---|---|
| 1 | rust_check | Self-assignments (x = x) |
| 2 | cyclomatic | Cyclomatic complexity (max 10) |
| 3 | deadcode | Unused variables |
| 4 | errcheck | Ignored Result values |
| 5 | shadow | Variable shadowing |
| 6 | rustfmt | Missing doc comments on pub items |
| 7 | unwrap_check | .unwrap() calls |
| 8 | format_check | Format string validation |
| 9 | imports | Wildcard imports |
| 10 | antipattern | Empty blocks, TODO, panic!, sleep in loops |
| 11 | cognitive | Cognitive complexity (max 15) |
| 12 | funcquality | Function length, params, nesting |
| 13 | security | Hardcoded secrets, SQL injection, unsafe |
| 14 | duplication | Duplicate code detection |
| 15 | magic | Magic numbers and strings |
| 16 | testcov | Test coverage analysis |
| 17 | docs | Documentation quality |
| 18 | performance | clone() in loops, collect().iter() |
| 19 | errorquality | Chained unwrap, generic errors |
| 20 | modularity | File size, function count, coupling, god modules |
Every scan automatically manages a bugs.md file in the project root:
- Issues found → creates/updates
bugs.mdwith all findings - All clean → removes
bugs.md
| Code | Meaning |
|---|---|
| 0 | All checks passed (or normal mode) |
| 1 | Error during execution |
| 2 | Issues found (CI mode only) |
cargo build --release
cp target/release/testtrack-rust /usr/local/bin/cargo test # 28 tests including self-scanMIT