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

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

Summary

Functions

Returns the given field's params value.

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"