Credence.Pattern.NoKernelShadowing (credence v0.5.0)

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: maxmax_value, minmin_value, hdhead, etc.