Credo.Check.Refactor.FunctionArity (Credo v1.5.0-rc.5) View Source

This check has a base priority of 0 and works with any version of Elixir.

Explanation

A function can take as many parameters as needed, but even in a functional language there can be too many parameters.

Can optionally ignore private functions (check configuration options).

Configuration parameters

Use the following parameters to configure this check:

  • max_arity: The maximum number of parameters which a function should take.

    Defaults to 8

  • ignore_defp: Set to true to ignore private functions.

    Defaults to false

Parameters can be configured via the .credo.exs config file.

Link to this section Summary

Link to this section Functions

Link to this function

do_run_on_source_file(exec, source_file, params)

View Source