Introduction
Poly-crap finds the functions in a codebase that are both complex and poorly tested.
Poly-crap finds the functions in a codebase that are both complex and poorly tested. It parses your source with tree-sitter, reads the coverage report your test runner already writes, and scores every function with the CRAP metric. It supports TypeScript, JavaScript, Python, Go, Rust, and Java, and it ships as one binary with no runtime dependencies.
Three ways to use it
Gate a pull request
Fail the build when a changed function is too complex for its tests.
Hold a baseline
Fail the build when any score gets worse.
Scan a repository
Find the functions most worth testing or splitting next.