# `Bylaw.Credo.Plugin.DisableForNextDefinition`
[🔗](https://github.com/ryanzidago/bylaw/blob/v0.4.0/lib/bylaw/credo/plugin/disable_for_next_definition.ex#L1)

Suppresses Credo issues throughout the next function clause.

Credo's next-line suppression cannot cover an issue reported several lines
into a function, and manual line ranges become stale as the function changes.
This plugin resolves the next `def` or `defp` clause's AST range so checks can
keep reporting the precise offending line.

Enable it in `.credo.exs`:

    plugins: [
      {Bylaw.Credo.Plugin.DisableForNextDefinition, []}
    ]

Then name the check before the definition:

    # credo:disable-for-next-definition Bylaw.Credo.Check.Elixir.NoRaise
    def run do
      raise "failure"
    end

Omitting the check name suppresses all checks in that definition. Each clause
of a multi-clause function is treated separately.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
