Fix results from $ mix credo suggest --all --strict

This commit is contained in:
Jay Hayes
2023-11-10 07:07:51 -06:00
parent ec227f71b9
commit 07f24b3298
4 changed files with 15 additions and 21 deletions

View File

@@ -3,7 +3,7 @@ defmodule Display do
use GenServer
alias IO.ANSI
alias Display.{ProgressBar, Intro, Failure, Notifications}
alias Display.{Failure, Intro, Notifications, ProgressBar}
def start_link do
GenServer.start_link(__MODULE__, %{clear_screen: true}, name: __MODULE__)

View File

@@ -19,12 +19,10 @@ defmodule Koans do
generate_test_method(unquote(compiled_name), unquote(number_of_args), unquote(body))
def unquote(compiled_name)() do
try do
unquote(compiled_body)
:ok
rescue
e -> {:error, __STACKTRACE__, e}
end
unquote(compiled_body)
:ok
rescue
e -> {:error, __STACKTRACE__, e}
end
end
end
@@ -36,12 +34,10 @@ defmodule Koans do
quote do
def unquote(name)(answer) do
try do
unquote(single_var)
:ok
rescue
e -> {:error, __STACKTRACE__, e}
end
unquote(single_var)
:ok
rescue
e -> {:error, __STACKTRACE__, e}
end
end
end
@@ -54,12 +50,10 @@ defmodule Koans do
quote do
def unquote(name)({:multiple, unquote(answer_vars)}) do
try do
unquote(multi_var)
:ok
rescue
e -> {:error, __STACKTRACE__, e}
end
unquote(multi_var)
:ok
rescue
e -> {:error, __STACKTRACE__, e}
end
end
end

View File

@@ -35,7 +35,7 @@ defmodule Tracker do
end
end
def wait_until_complete() do
def wait_until_complete do
pid = Process.whereis(Tracker)
receive do

View File

@@ -2,7 +2,7 @@ defmodule Watcher do
@moduledoc false
use GenServer
def start_link() do
def start_link do
GenServer.start_link(__MODULE__, dirs: ["lib/koans"])
end