Prior to this, this example test would raise 9 issues:
test "regression test for issue list duplication" do
"""
defmodule CredoSampleModule do
def hello(a) when not is_nil(a), do: a
def foo1(x) when is_integer(x), do: x
def foo2(x) when is_integer(x), do: x
def foo3(x) when is_integer(x), do: x
end
"""
|> to_source_file()
|> run_check(@described_check)
|> assert_issue()
end
Fixes #1056.
Prior to this, this example test would raise 9 issues: