Skip to content

Commit 9f356ad

Browse files
committed
Add ** operator
1 parent ef5224c commit 9f356ad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/credo/check/readability/function_names.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Credo.Check.Readability.FunctionNames do
3535
@all_sigil_atoms Enum.map(@all_sigil_chars, &:"sigil_#{&1}")
3636

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

4040
@doc false
4141
@impl true

test/credo/check/readability/function_names_test.exs

+4
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ defmodule Credo.Check.Readability.FunctionNamesTest do
152152
def left --- right do
153153
# ++ code
154154
end
155+
156+
def left ** right do
157+
# ...
158+
end
155159
"""
156160
|> to_source_file
157161
|> run_check(@described_check)

0 commit comments

Comments
 (0)