rrrene* About

Credo and Dogma: A Comparison of Elixir Code Linters

Last week I released Credo, a new static code analysis tool that acts as a code linter, but also focusses on teaching coding practices and code consistency.

The one other code linter for Elixir (that I am aware of) is Dogma. Shortly after Credo’s release Louis, Dogma’s maintainer, asked me to explain the differences between the two projects.

This is a double-edged sword for me, because I am one of Dogma’s main contributors as well, so I am quite fond of it. On the other hand I spent every free moment in the last two months creating Credo. So it won’t come as a surprise that I think Credo is the “better” tool in a couple of ways.

So here is my - slightly biased - comparison:

So, that’s basically it. If you like the ideas presented here, check out Credo on GitHub. Feedback is always welcome!


For a more conventional comparison, here’s a table that represents the state of affairs as of this writing:

Credo Dogma
Supported Elixir versions 1.1.x 1.0.x, 1.1.x
Customizable check configuration via parameters
Help for check parameters in CLI -
Different formatters -
Semantic categories -
Dynamic priorities -
Issue severity -
Common style checks for code readability
Giving filename/line/column/call where checks fail / / / / / - / -
Software design suggestions -
Project-wide consistency analysis -
Warnings for potentially harmful code -
Explanations for violations -