Skip to content

Commit 07f24b3

Browse files
committed
Fix results from $ mix credo suggest --all --strict
1 parent ec227f7 commit 07f24b3

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

lib/display.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Display do
33
use GenServer
44

55
alias IO.ANSI
6-
alias Display.{ProgressBar, Intro, Failure, Notifications}
6+
alias Display.{Failure, Intro, Notifications, ProgressBar}
77

88
def start_link do
99
GenServer.start_link(__MODULE__, %{clear_screen: true}, name: __MODULE__)

lib/koans.ex

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ defmodule Koans do
1919
generate_test_method(unquote(compiled_name), unquote(number_of_args), unquote(body))
2020

2121
def unquote(compiled_name)() do
22-
try do
23-
unquote(compiled_body)
24-
:ok
25-
rescue
26-
e -> {:error, __STACKTRACE__, e}
27-
end
22+
unquote(compiled_body)
23+
:ok
24+
rescue
25+
e -> {:error, __STACKTRACE__, e}
2826
end
2927
end
3028
end
@@ -36,12 +34,10 @@ defmodule Koans do
3634

3735
quote do
3836
def unquote(name)(answer) do
39-
try do
40-
unquote(single_var)
41-
:ok
42-
rescue
43-
e -> {:error, __STACKTRACE__, e}
44-
end
37+
unquote(single_var)
38+
:ok
39+
rescue
40+
e -> {:error, __STACKTRACE__, e}
4541
end
4642
end
4743
end
@@ -54,12 +50,10 @@ defmodule Koans do
5450

5551
quote do
5652
def unquote(name)({:multiple, unquote(answer_vars)}) do
57-
try do
58-
unquote(multi_var)
59-
:ok
60-
rescue
61-
e -> {:error, __STACKTRACE__, e}
62-
end
53+
unquote(multi_var)
54+
:ok
55+
rescue
56+
e -> {:error, __STACKTRACE__, e}
6357
end
6458
end
6559
end

lib/tracker.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Tracker do
3535
end
3636
end
3737

38-
def wait_until_complete() do
38+
def wait_until_complete do
3939
pid = Process.whereis(Tracker)
4040

4141
receive do

lib/watcher.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Watcher do
22
@moduledoc false
33
use GenServer
44

5-
def start_link() do
5+
def start_link do
66
GenServer.start_link(__MODULE__, dirs: ["lib/koans"])
77
end
88

0 commit comments

Comments
 (0)