Fix results from $ mix credo suggest --all --strict
This commit is contained in:
@@ -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__)
|
||||
|
||||
30
lib/koans.ex
30
lib/koans.ex
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user