{"repo":"thoughtbot/complexity","free":true,"listed":false,"github":"https://github.com/thoughtbot/complexity","clone":"git clone https://github.com/thoughtbot/complexity.git","description":"A command line tool to identify complex code","language":"Rust","stars":171,"topics":["cli","rust","complexity","code-analysis"],"license":"MIT","category":"cli-tools","readme_excerpt":"complexity Calculate an approximation of code complexity per file in a language-agnostic way. Motivation If you're new to a codebase, it's helpful to understand at a glance what files may be particularly complex. With that guidance, developers can more quickly read through the code to understand hotspots. At thoughtbot, we work in codebases of all shapes and languages, including Ruby, Elixir, Python, Scala, TypeScript/JavaScript, Go, Elm, Swift, and Java. This CLI tool aims to highlight complexity across any of these codebases by assigning simple heuristics to increases in indentation. This concept has been discussed in [this paper]; complexity does not intend to mimic approaches in this paper directly, although the motivations discussed in the paper – especially avoiding calculating cyclomatic complexity ([McCabe]) given requirements of AST parsing and analysis due to time and language requirements – are of considerable overlap. [this paper]: https://doi.org/10.1016/j.scico.2009.02.005 [McCabe]: https://en.wikipedia.org/wiki/Cyclomatic complexity Installation MacOS with Homebrew Configuration complexity has configuration options to ignore certain file extensions or substrings with paths. To install this default configuration, run: This creates/overwrites a yaml configuration at $HOME/.config/complexity/complexity.yml . By default, extensions including lock , toml , json , and md are ignored. complexity will automatically honor .gitignore settings. Usage Basic Let's grab the ","default_branch":null,"files":null,"tree":[],"storefront":"/r/thoughtbot","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thoughtbot/complexity/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}