Credo.Check.Refactor.CyclomaticComplexity.complexity_for
You're seeing just the function
complexity_for
, go back to Credo.Check.Refactor.CyclomaticComplexity module for more information.
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