Permalink
Browse files

Merge pull request #604 from rentpath/feature/fix_readability_issues

Fix a few more issues shown by mix credo
  • Loading branch information...
rrrene committed Dec 28, 2018
2 parents cb1d8cf + 435e793 commit 7251a7988e8b4c4281faa418228a5170af91145c
@@ -228,6 +228,7 @@ defmodule Credo.Code.Token do
end
end

# credo:disable-for-next-line Credo.Check.Readability.ModuleNames
defmodule ElixirPre1_6_0 do
@moduledoc false

@@ -18,12 +18,11 @@ defmodule Credo.Execution.ExecutionTiming do
def inspect(label, fun) do
{time, result} = :timer.tc(fun)

# credo:disable-for-lines:3 Credo.Check.Warning.IoInspect
time
|> format_time()
|> IO.inspect(label: label)

# credo:disable-for-previous-line Credo.Check.Warning.IoInspect

result
end

@@ -46,12 +46,7 @@ defmodule Credo.Execution.Task.ConvertCLIOptionsToConfig do
UI.warn("")

Enum.each(lines, fn {line_no2, line} ->
color =
if line_no2 == line_no do
[:bright, :cyan]
else
[:faint]
end
color = color_list(line_no, line_no2)

UI.warn([color, String.pad_leading("#{line_no2}", 5), :reset, " ", color, line])
end)
@@ -64,4 +59,7 @@ defmodule Credo.Execution.Task.ConvertCLIOptionsToConfig do

exec
end

defp color_list(line_no, line_no2) when line_no == line_no2, do: [:bright, :cyan]
defp color_list(_, _), do: [:faint]
end

0 comments on commit 7251a79

Please sign in to comment.