Skip to content

Commit

Permalink
Fix FunctionNames for private sigils
Browse files Browse the repository at this point in the history
Refs #1146
  • Loading branch information
rrrene committed Aug 3, 2024
1 parent e048871 commit 9f00f6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/credo/check/readability/function_names.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ defmodule Credo.Check.Readability.FunctionNames do
_issue_meta,
_allow_acronyms?
)
when op in [:def, :defmacro] do
when op in [:def, :defmacro, :defmacrop] do
{ast, issues}
end

Expand All @@ -77,7 +77,7 @@ defmodule Credo.Check.Readability.FunctionNames do
_issue_meta,
_allow_acronyms?
)
when op in [:def, :defmacro] do
when op in [:def, :defmacro, :defmacrop] do
{ast, issues}
end
end
Expand Down
2 changes: 2 additions & 0 deletions test/credo/check/readability/function_names_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ defmodule Credo.Check.Readability.FunctionNamesTest do
defmacro sigil_U({:<<>>, _, [string]}, []) when is_binary(string) do
# ...
end
defmacrop sigil_d(str, _opts) do
end
"""
|> to_source_file
|> run_check(@described_check)
Expand Down

0 comments on commit 9f00f6b

Please sign in to comment.