Skip to content

Commit

Permalink
Merge pull request #169 from tfiedlerdejanze/tf-consistent-wording
Browse files Browse the repository at this point in the history
Consistent usage of "anonymous" in comments/tests
  • Loading branch information
novaugust authored May 21, 2024
2 parents 9179e74 + 3384345 commit a5dc8aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/style/single_node.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule Styler.Style.SingleNode do
#
# `?-` isn't part of the number node - it's its parent - so all numbers are positive at this point
defp style({:__block__, meta, [number]}) when is_number(number) and number >= 10_000 do
# Checking here rather than in the anon function due to compiler bug https://github.com/elixir-lang/elixir/issues/10485
# Checking here rather than in the anonymous function due to compiler bug https://github.com/elixir-lang/elixir/issues/10485
integer? = is_integer(number)

meta =
Expand Down
2 changes: 1 addition & 1 deletion test/style/module_directives_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ defmodule Styler.Style.ModuleDirectivesTest do
""")
end

test "anon function" do
test "anonymous function" do
assert_style("fn -> alias A.{C, B} end", """
fn ->
alias A.B
Expand Down
2 changes: 1 addition & 1 deletion test/style/single_node_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ defmodule Styler.Style.SingleNodeTest do
)
end

test "anon funs" do
test "anonymous functions" do
assert_style(
"fn bar = %{baz: baz? = true}, opts = [[a = %{}] | _] -> :ok end",
"fn %{baz: true = baz?} = bar, [[%{} = a] | _] = opts -> :ok end"
Expand Down
2 changes: 1 addition & 1 deletion test/support/style_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ defmodule Styler.StyleCase do
nil -> true
# do/else/etc
{{:__block__, _, [_]}, {:__block__, [], _}} -> true
# anon fun
# anonymous function
{:->, _, _} -> true
_ -> false
end
Expand Down

0 comments on commit a5dc8aa

Please sign in to comment.