static-analysis
static-analysis copied to clipboard
Add pyscn to Python tools
Summary
Adds pyscn to the Python static analysis tools list.
pyscn is an intelligent Python code quality analyzer written in Go that performs deep, structural static analysis:
- CFG-based cyclomatic complexity analysis — builds control-flow graphs from tree-sitter ASTs to calculate McCabe complexity
- Multi-algorithm clone detection (Type 1-4) — textual (FNV hash), normalized AST (Jaccard), structural (APTED tree edit distance), and semantic (CFG-based) clone detection
- Dead code detection — identifies unreachable code after return/break/continue/raise and unreachable conditional branches
- Coupling metrics (CBO) — analyzes class dependencies for maintainability assessment
- Uses tree-sitter for robust Python parsing
- ~980 GitHub stars, actively maintained, MIT licensed
Checklist
- [x] Tool is actively maintained (multiple contributors)
- [x] Tool has more than 20 GitHub stars (~980)
- [x] Project is mature (exists for more than three months)
- [x] Entry added as YAML in
data/tools/pyscn.yml - [x] Description is under 500 characters
- [x] License specified (MIT)
@mre friendly ping 🙂 Open since March and still green. I just refreshed the entry to point homepage/resources at the docs site. pyscn is at ~1k stars, MIT, actively maintained. Happy to tweak anything if needed, thanks!