Static code analysis for Elixir, with a focus on teaching and code consistency
open sourceMITfree
Credo is a static code analysis tool for Elixir. Added to a project as a dev dependency and run with mix credo, it points out refactoring opportunities, complex code, common mistakes and inconsistent naming, and can enforce a chosen coding style. Editors and IDEs (IntelliJ Elixir, a VS Code extension, Emacs flycheck, Neovim, Kakoune) can run it in the background and mark issues inline, and Codacy uses it for automated code review.
Ways to install
Package managers
Problems it solves
- lint my Elixir code for consistency and common mistakes
- enforce a coding style across an Elixir team
- find overly complex functions in an Elixir project
Features
- Finds refactoring opportunities and complex code fragments
- Warns about common mistakes and naming inconsistencies
- Can enforce a chosen coding style
- Runs as a mix task in a project
- Editor integrations mark issues inline
Alternatives
The same job
These do what Credo does.
- Checkstyle Checks Java source code against configurable coding-standard rules
- Clippy The official Rust linter: 800+ lints for common mistakes and unidiomatic code
- Stylelint A CSS linter that catches errors and enforces conventions in your stylesheets
- RuboCop RSpec RuboCop extension with cops for RSpec test files
- SwiftLint Linter that enforces Swift style and conventions, with auto-fix
- Flake8 A Python linter that checks style and common errors by combining pycodestyle, pyflakes and McCabe
