Skip to content

Commit 9f00f6b

Browse files
committed
Fix FunctionNames for private sigils
Refs #1146
1 parent e048871 commit 9f00f6b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/credo/check/readability/function_names.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ defmodule Credo.Check.Readability.FunctionNames do
6666
_issue_meta,
6767
_allow_acronyms?
6868
)
69-
when op in [:def, :defmacro] do
69+
when op in [:def, :defmacro, :defmacrop] do
7070
{ast, issues}
7171
end
7272

@@ -77,7 +77,7 @@ defmodule Credo.Check.Readability.FunctionNames do
7777
_issue_meta,
7878
_allow_acronyms?
7979
)
80-
when op in [:def, :defmacro] do
80+
when op in [:def, :defmacro, :defmacrop] do
8181
{ast, issues}
8282
end
8383
end

test/credo/check/readability/function_names_test.exs

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ defmodule Credo.Check.Readability.FunctionNamesTest do
6969
defmacro sigil_U({:<<>>, _, [string]}, []) when is_binary(string) do
7070
# ...
7171
end
72+
defmacrop sigil_d(str, _opts) do
73+
end
7274
"""
7375
|> to_source_file
7476
|> run_check(@described_check)

0 commit comments

Comments
 (0)