From 5b2642b95061ebed47b9a648158c6c2890162ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20F=C3=B6hring?= Date: Mon, 8 Jan 2024 21:33:46 +0100 Subject: [PATCH] Actually avoid then/2 --- lib/credo/check.ex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/credo/check.ex b/lib/credo/check.ex index 468551ce7..3e09f81e5 100644 --- a/lib/credo/check.ex +++ b/lib/credo/check.ex @@ -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