Optimum Credo checks

almirsarajcic

almirsarajcic

Created 9 days ago

During code reviews, we’ve noticed some patterns emerge. To avoid wasting time and attention on these pesky details, we started using Credo in all our projects.

Not to mention, Credo provides sufficient details that AI agents can automatically fix code style issues without a sweat.

What came out of the box wasn’t enough for us, so we’ve created additional custom Checks.

Here’s how to use them:

# Add `:optimum_credo` dependency to `mix.exs`
def deps do
  [
    {:optimum_credo, "~> 0.1", only: :test, runtime: false},
  ]
end

# Add a check to the `.credo.exs` config file
{OptimumCredo.Check.Readability.ImportOrder, []},

Source code: https://github.com/optimumBA/optimum_credo.

To see all available checks, go to https://hexdocs.pm/optimum_credo/readme.html.
We’ll be adding more of them in the future.