# poly-crap > Find the functions in a codebase that are both complex and poorly tested. ## Docs - [Introduction](https://drew-simmons.github.io/poly-crap): Poly-crap finds the functions in a codebase that are both complex and poorly tested. - [Install](https://drew-simmons.github.io/poly-crap/install): Get the poly-crap binary with the installer, from crates.io, or from a source build. - [Quick start](https://drew-simmons.github.io/poly-crap/quickstart): Score a repository in four steps, from a coverage report to a gated branch. - [How the score works](https://drew-simmons.github.io/poly-crap/how-the-score-works): The CRAP formula, what follows from it, and how to choose a threshold for your code. - [Troubleshooting](https://drew-simmons.github.io/poly-crap/troubleshooting): What each warning and surprise means, and what to do about it. ## Coverage reports - [Coverage reports](https://drew-simmons.github.io/poly-crap/coverage): The four report formats poly-crap reads and the command that produces one for each stack. - [Auto-discovery](https://drew-simmons.github.io/poly-crap/coverage/auto-discovery): Where poly-crap looks for a coverage report when none is named, and what happens when it finds none. - [Merging and matching paths](https://drew-simmons.github.io/poly-crap/coverage/matching-paths): How poly-crap merges several reports, lines up report entries with source files, and treats functions no report covers. ## Reading the output - [Reading the output](https://drew-simmons.github.io/poly-crap/output): How to read the table, the summary lines, and the colors poly-crap prints on a terminal. - [JSON and SARIF](https://drew-simmons.github.io/poly-crap/output/machine-formats): Machine-readable reports for baselines, scripts, and GitHub code scanning. ## Gating changes - [Changed functions](https://drew-simmons.github.io/poly-crap/gating/changed-functions): Score only the functions a branch touched and fail the build when one is over the threshold. - [Baselines](https://drew-simmons.github.io/poly-crap/gating/baselines): Save a JSON report on the main branch and fail the build when any score gets worse. - [CI recipes](https://drew-simmons.github.io/poly-crap/gating/ci-recipes): Gate pull requests in GitHub Actions and commits with a pre-commit hook. ## What gets scored - [What gets scored](https://drew-simmons.github.io/poly-crap/scope): The six languages poly-crap parses and which functions, methods, and callables get a score. - [Complexity rules](https://drew-simmons.github.io/poly-crap/scope/complexity-rules): What adds a decision point to a function's cyclomatic complexity, and what does not. - [Excluded paths and allow lists](https://drew-simmons.github.io/poly-crap/scope/excludes-and-allow-lists): Leave files out before parsing with excludes, or functions out after scoring with allow lists. ## Reference - [Options](https://drew-simmons.github.io/poly-crap/reference/options): Every command-line flag, its default, and its key in .poly-crap.toml. - [Configuration file](https://drew-simmons.github.io/poly-crap/reference/configuration-file): Where poly-crap finds .poly-crap.toml, how it merges with the command line, and an example. - [Exit codes](https://drew-simmons.github.io/poly-crap/reference/exit-codes): What exit codes 0, 1, and 2 mean, and when a parse failure fails the run. ## Agent resources - [llms-full.txt](https://drew-simmons.github.io/poly-crap/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://drew-simmons.github.io/poly-crap/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://drew-simmons.github.io/poly-crap/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://drew-simmons.github.io/poly-crap/openapi.json. - [API catalog](https://drew-simmons.github.io/poly-crap/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [agent-readability.json](https://drew-simmons.github.io/poly-crap/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://drew-simmons.github.io/poly-crap/sitemap.xml): Every indexable page URL with its last-modified date.