Shared Credo policy and custom checks for Elixir codebases.

CodeStyle is intended to be used alongside ExDNA and Styler. Those tools are not bundled with this library and should be configured separately in consuming projects.

Installation

Add code_style to a consuming Mix project:

{:code_style, "~> 0.1.0", only: [:dev, :test], runtime: false}

Then load the Credo plugin in .credo.exs:

%{
  configs: [
    %{
      name: "default",
      plugins: [{CodeStyle, []}]
    }
  ]
}

The plugin registers the shared Credo policy, ExSlop checks, migration safety, and the custom checks below. It does not override Credo's file discovery; consuming projects can define their own files configuration when needed.

Custom Checks

Development

Run the package checks with Mix:

mix check