mirror of
https://github.com/ash-project/igniter.git
synced 2024-09-19 13:02:51 +12:00
fix: :error consistency in remove_keyword_key and argument_equals? in Config.configure (#68)
This commit is contained in:
parent
fa5f849928
commit
e860b1f9d3
2 changed files with 8 additions and 8 deletions
|
@ -215,15 +215,15 @@ defmodule Igniter.Code.Keyword do
|
|||
if Igniter.Code.Tuple.tuple?(item) do
|
||||
case Igniter.Code.Tuple.tuple_elem(item, 0) do
|
||||
{:ok, first_elem} ->
|
||||
Common.node_matches_pattern?(first_elem, ^key)
|
||||
Common.nodes_equal?(first_elem, key)
|
||||
|
||||
:error ->
|
||||
false
|
||||
:error
|
||||
end
|
||||
end
|
||||
end) do
|
||||
:error ->
|
||||
{:ok, zipper}
|
||||
:error
|
||||
|
||||
{:ok, zipper} ->
|
||||
{:ok, zipper |> Zipper.remove()}
|
||||
|
|
|
@ -400,8 +400,8 @@ defmodule Igniter.Project.Config do
|
|||
:config,
|
||||
3,
|
||||
fn function_call ->
|
||||
Igniter.Code.Function.argument_matches_pattern?(function_call, 0, ^app_name) &&
|
||||
Igniter.Code.Function.argument_matches_pattern?(function_call, 1, ^config_item)
|
||||
Igniter.Code.Function.argument_equals?(function_call, 0, app_name) &&
|
||||
Igniter.Code.Function.argument_equals?(function_call, 1, config_item)
|
||||
end
|
||||
) do
|
||||
:error ->
|
||||
|
@ -418,8 +418,8 @@ defmodule Igniter.Project.Config do
|
|||
:config,
|
||||
3,
|
||||
fn function_call ->
|
||||
Igniter.Code.Function.argument_matches_pattern?(function_call, 0, ^app_name) &&
|
||||
(Igniter.Code.Function.argument_matches_pattern?(function_call, 1, ^config_item) ||
|
||||
Igniter.Code.Function.argument_equals?(function_call, 0, app_name) &&
|
||||
(Igniter.Code.Function.argument_equals?(function_call, 1, config_item) ||
|
||||
Igniter.Code.Function.argument_matches_predicate?(
|
||||
function_call,
|
||||
1,
|
||||
|
@ -448,7 +448,7 @@ defmodule Igniter.Project.Config do
|
|||
:config,
|
||||
2,
|
||||
fn function_call ->
|
||||
Igniter.Code.Function.argument_matches_pattern?(function_call, 0, ^app_name)
|
||||
Igniter.Code.Function.argument_equals?(function_call, 0, app_name)
|
||||
end
|
||||
) do
|
||||
:error ->
|
||||
|
|
Loading…
Reference in a new issue