Credence.Pattern.NoKernelShadowing
(credence v0.4.3)
Copy Markdown
Idiomatic rule: fixes variables that shadow Kernel functions.
Using max or min as variable names (e.g., in Enum.reduce or function
arguments) shadows the built-in Kernel functions. While max(max, value) is
valid Elixir, it is unidiomatic and can lead to confusion.
This rule renames shadowing variables to descriptive alternatives:
max → max_value, min → min_value, hd → head, etc.