Skip to content

Commit

Permalink
Add ** operator
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertbw committed Nov 1, 2024
1 parent ef5224c commit 9f356ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/credo/check/readability/function_names.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Credo.Check.Readability.FunctionNames do
@all_sigil_atoms Enum.map(@all_sigil_chars, &:"sigil_#{&1}")

# all non-special-form operators
@all_nonspecial_operators ~W(! && ++ -- .. <> =~ @ |> || != !== * + - / < <= == === > >= ||| &&& <<< >>> <<~ ~>> <~ ~> <~> <|> ^^^ ~~~ +++ ---)a
@all_nonspecial_operators ~W(! && ++ -- .. <> =~ @ |> || != !== * + - / ** < <= == === > >= ||| &&& <<< >>> <<~ ~>> <~ ~> <~> <|> ^^^ ~~~ +++ ---)a

@doc false
@impl true
Expand Down
4 changes: 4 additions & 0 deletions test/credo/check/readability/function_names_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ defmodule Credo.Check.Readability.FunctionNamesTest do
def left --- right do
# ++ code
end
def left ** right do
# ...
end
"""
|> to_source_file
|> run_check(@described_check)
Expand Down

0 comments on commit 9f356ad

Please sign in to comment.