MetaCredo.Check.Consistency.ParameterPatternMatching (MetaCredo v0.1.0)

View Source

Detects functions that destructure data in the body when they could destructure directly in the parameters. Pattern matching in function heads is more idiomatic and clearly communicates intent.

For example, prefer def foo(%{name: name}) over def foo(map) do name = map.name end.

Category: Consistency / Priority: low