From 9f356ad449d6123fad3f57e79d0c7fc8f377b484 Mon Sep 17 00:00:00 2001 From: Gilbert Bishop-White Date: Fri, 1 Nov 2024 13:16:32 +0000 Subject: [PATCH] Add ** operator --- lib/credo/check/readability/function_names.ex | 2 +- test/credo/check/readability/function_names_test.exs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/credo/check/readability/function_names.ex b/lib/credo/check/readability/function_names.ex index f0e59474f..c2b4253db 100644 --- a/lib/credo/check/readability/function_names.ex +++ b/lib/credo/check/readability/function_names.ex @@ -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 diff --git a/test/credo/check/readability/function_names_test.exs b/test/credo/check/readability/function_names_test.exs index f18004856..c7ec57df8 100644 --- a/test/credo/check/readability/function_names_test.exs +++ b/test/credo/check/readability/function_names_test.exs @@ -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)