Skip to content

Commit

Permalink
Actually avoid then/2
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrene committed Jan 8, 2024
1 parent 84d1915 commit 5b2642b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/credo/check.ex
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,10 @@ defmodule Credo.Check do
:tags
]

@__default_checks__ do
{config, _binding} = Code.eval_file(".credo.exs")
%{:name => "default", :checks => %{:enabled => check_tuples}} = List.first(config[:configs])
{config, _binding} = Code.eval_file(".credo.exs")
%{:name => "default", :checks => %{:enabled => check_tuples}} = List.first(config[:configs])

Enum.map(check_tuples, fn {check, _params} -> check end)
end
@__default_checks__ Enum.map(check_tuples, fn {check, _params} -> check end)

@doc false
defmacro __using__(opts) do
Expand Down

0 comments on commit 5b2642b

Please sign in to comment.