Skip to content

Commit d0db408

Browse files
committed
Fix warnings for Elixir 1.18
1 parent 2e15cdd commit d0db408

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
erlang 27.0
2-
elixir 1.17.3
2+
elixir 1.18.0-rc.0
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
defmodule Credo.CLI.Command.Categories.CategoriesOutput do
22
@moduledoc false
33

4-
use Credo.CLI.Output.FormatDelegator,
5-
default: Credo.CLI.Command.Categories.Output.Default,
6-
json: Credo.CLI.Command.Categories.Output.Json
7-
84
def print_categories(exec, categories) do
95
format_mod = format_mod(exec)
106

117
format_mod.print(exec, categories)
128
end
9+
10+
defp format_mod(%{format: "json"}), do: Credo.CLI.Command.Categories.Output.Json
11+
defp format_mod(%{format: nil}), do: Credo.CLI.Command.Categories.Output.Default
1312
end

lib/credo/cli/command/info/info_output.ex

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
defmodule Credo.CLI.Command.Info.InfoOutput do
22
@moduledoc false
33

4-
use Credo.CLI.Output.FormatDelegator,
5-
default: Credo.CLI.Command.Info.Output.Default,
6-
json: Credo.CLI.Command.Info.Output.Json
7-
84
alias Credo.CLI.Output.UI
95

106
def print(exec, info) do
@@ -13,6 +9,9 @@ defmodule Credo.CLI.Command.Info.InfoOutput do
139
format_mod.print(exec, info)
1410
end
1511

12+
defp format_mod(%{format: "json"}), do: Credo.CLI.Command.Info.Output.Json
13+
defp format_mod(%{format: nil}), do: Credo.CLI.Command.Info.Output.Default
14+
1615
def print_help(exec) do
1716
usage = ["Usage: ", :olive, "mix credo info [options]"]
1817

0 commit comments

Comments
 (0)