CredoHotUpgrades.Plugin (CredoHotUpgrades v1.0.0)

Copy Markdown View Source

Registers every CredoHotUpgrades check with Credo.

Add it to the plugins of your .credo.exs:

%{
  configs: [
    %{
      name: "default",
      plugins: [{CredoHotUpgrades.Plugin, []}]
    }
  ]
}

New checks arrive with a credo_hot_upgrades upgrade, there is no list to maintain by hand. That holds for a .credo.exs that has its own checks: %{enabled: [...]}, the one mix credo.gen.config writes, where Credo itself drops the checks a plugin registers: the plugin adds the ones the project does not name.

Turn one off the way you would any Credo check:

checks: %{disabled: [{CredoHotUpgrades.Check.NoNif, []}]}

or with {CredoHotUpgrades.Check.NoNif, false} in enabled. A check the project names keeps the parameters the project gives it.

Summary

Functions

init(exec)