You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make quality # or: cargo fmt --check && cargo clippy -- -D warnings && cargo test
CLI Design
All output commands MUST support --json flag
CI mode: --ci exits 2 if candidates exceed --ci-max-candidates
Testing
Unit tests: co-located in mod tests blocks
Integration: tests/integration_tests.rs
Use tempfile crate for ephemeral test projects
ANTI-PATTERNS
Pattern
Why Forbidden
Skip make quality
Zero tolerance for warnings
Excessive .unwrap()
Use AnalyzerError. Known debt in walker.rs
UNIQUE STYLES
Thin binary: main.rs is ~80 lines. All logic in lib.rs.
Traditional mod.rs: Uses analyzer/mod.rs pattern (not modern Rust 2018 style).
TSX parsing quirk: JSX text requires & → & before parsing. See escape_ampersands_in_jsx_text.
COMMANDS
# Development
make build # cargo build
make release # cargo build --release
make test# cargo test
make lint # cargo clippy -- -D warnings
make quality # fmt + lint + test (pre-commit)# Install
make install # → ~/.local/bin/code-analyzer# Run
code-analyzer .# analyze current dir
code-analyzer --output json # JSON only
code-analyzer --ci --ci-max-candidates 5 # CI mode