Rewrite Empty Enum Checks
mainQuokka automatically converts checks for empty enums (like length() == 0 or Enum.count() > 0) into the more idiomatic and efficient Enum.empty?/1 or Enum.any?/2. This addresses Credo.Check.Warning.ExpensiveEmptyEnumCheck and is not configurable.
# Given:
if enum |> MyModule.transform() |> length() == 0, do: "empty"
# Styled:
if enum |> MyModule.transform() |> Enum.empty?(), do: "empty"
# Given:
if Enum.count(enum) > 0, do: "not empty"
# Styled:
if not Enum.empty?(enum), do: "not empty"