Skip to content

v2.3.1

Choose a tag to compare

@dannote dannote released this 12 May 13:38
· 117 commits to master since this release

New smell patterns

  • Case-on-booleancase expr do true -> ...; false -> ... end when the subject is a boolean expression. Uses capture guards to avoid false positives on sentinel returns.
  • Cond two-clausecond do ... true -> ... end with exactly two clauses → if/else
  • Unless/elseif with positive case first
  • Redundant assignmentresult = expr; result → just expr
  • Manual max/minif a > b, do: a, else: bKernel.max/2
  • @doc false on defp — redundant, private functions can't have docs
  • Sort then negative takeEnum.sort |> Enum.take(-n)Enum.sort(:desc) |> Enum.take(n)

Fixed

  • ++ in reduce false positives — now checks whether ++ actually references the accumulator variable. 17 fewer false positives across 200 Hex packages.
  • Dogfooding — fixed all actionable smell findings in Reach's own code across 15 files
  • CImix ci now runs reach.check --arch --smells