Credo v1.3.0-rc1 Credo.Check.Refactor.CyclomaticComplexity View Source

Link to this section Summary

Functions

Returns the Cyclomatic Complexity score for the block inside the given AST, which is expected to represent a function or macro definition

explanation() deprecated
params_defaults() deprecated
params_names() deprecated

Link to this section Functions

Returns the Cyclomatic Complexity score for the block inside the given AST, which is expected to represent a function or macro definition.

iex> {:def, [line: 1],
...>   [
...>     {:first_fun, [line: 1], nil},
...>     [do: {:=, [line: 2], [{:x, [line: 2], nil}, 1]}]
...>   ]
...> } |> Credo.Check.Refactor.CyclomaticComplexity.complexity_for
1.0
This function is deprecated. Use explanations()[:check] instead.
Link to this function explanation_for_params() View Source
This function is deprecated. Use explanations()[:params] instead.
This function is deprecated. Use param_defaults/1 instead.
This function is deprecated. Use param_names/1 instead.