View Source Credo.Check.Params (Credo v1.6.7)

This module provides functions for handling parameters ("params") given to checks through .credo.exs (i.e. the Credo.ConfigFile).

Link to this section Summary

Functions

Returns the given field's params value.

Link to this section Functions

Link to this function

get(params, field, check_mod)

View Source

Returns the given field's params value.

Example:

defmodule SamepleCheck do
  def param_defaults do
    [foo: "bar"]
  end
end

iex> Credo.Check.Params.get([], :foo, SamepleCheck)
"bar"
iex> Credo.Check.Params.get([foo: "baz"], :foo, SamepleCheck)
"baz"