// the find
rrrene/credo
A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
Credo is a static analysis linter for Elixir, covering consistency, readability, refactoring opportunities, and common warning-level mistakes. It's aimed at Elixir teams who want enforceable style conventions and a teaching tool for less experienced devs on the codebase, not just a bug-finder.
The check catalog is genuinely broad — consistency checks (tabs vs spaces, line endings, alias/import ordering) sit alongside real correctness warnings (unsafe_to_atom, unsafe_exec, raise_inside_rescue) and complexity metrics (ABC size, cyclomatic complexity, nesting depth). The `mix credo diff` command scopes issues to just what changed against a git ref, which makes it usable in CI without drowning a legacy codebase in pre-existing violations. Plugin support and a documented custom-check API (`guides/custom_checks`) mean teams aren't stuck with the built-in rule set. Output formatters cover JSON, SARIF, and flycheck, so it slots into GitHub code scanning or editor tooling without scraping stdout.
It's Elixir-only and tied to `mix`, so it's a non-option for anyone outside that ecosystem — not a criticism of the tool, but worth noting it doesn't generalize. The check list has grown large enough (over 100 files under lib/credo/check) that new users will spend real time in `.credo.exs` deciding what to disable; the defaults are opinionated in ways that won't match every team's style guide. Some checks like `duplicated_code` and `module_dependencies` are known in the Elixir community to be slow on large codebases, and there's no built-in caching between runs to offset that. Autocorrection isn't a feature here — it flags issues but doesn't fix them, unlike newer linters in other ecosystems.