Skip to content

Commit

Permalink
Fix warning for Credo.Check for Elixir 1.18
Browse files Browse the repository at this point in the history
Fixes a warning that some generated clauses weren't called in a static
test case
  • Loading branch information
rrrene committed Dec 13, 2024
1 parent d4b9901 commit 91502ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions lib/credo/check.ex
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,7 @@ defmodule Credo.Check do

defoverridable Credo.Check

defp append_issues_and_timings([] = _issues, exec) do
exec
end

defp append_issues_and_timings([_ | _] = issues, exec) do
defp append_issues_and_timings(issues, exec) do
Credo.Execution.ExecutionIssues.append(exec, issues)
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/credo/execution/execution_issues.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ defmodule Credo.Execution.ExecutionIssues do
end

@doc "Appends an `issue` for the specified `filename`."
def append(_, [] = _issues), do: :ok

def append(%Execution{issues_pid: pid}, issues) when is_list(issues) do
issues
|> Enum.group_by(& &1.filename)
Expand Down

0 comments on commit 91502ce

Please sign in to comment.