CredoExceptionSwallow (CredoExceptionSwallow v0.3.0)

View Source

Credo checks to detect failures that go nowhere.

This library provides custom Credo checks that enforce proper error handling: in rescue blocks, and in the error branches that never raise anything at all. Both hide bugs and make debugging nearly impossible.

Installation

Add to your mix.exs:

def deps do
  [
    {:credo_exception_swallow, "~> 0.3.0", only: [:dev, :test], runtime: false}
  ]
end

Configuration

Add to your .credo.exs in the checks section:

{CredoExceptionSwallow.Checks.Warning.SilentRescue, []},
{CredoExceptionSwallow.Checks.Warning.LoggedAndDroppedError, []}

Available Checks