Credence.Pattern.NoExplicitMaxReduce (credence v0.4.0)

Copy Markdown

Strict semantic rule: Flags ONLY explicit max-reduction patterns inside Enum.reduce/3.

This rule does NOT perform heuristic detection. It only matches cases where the reduce body clearly implements a max/argmax operation using:

  • max(a, b)
  • if a > acc do ... else ...
  • if a >= acc do ... else ...

Any deviation (tuple state, maps, pipelines, multiple expressions, etc.) will NOT be flagged.