Skip to content

Commit

Permalink
Merge pull request #1109 from kianmeng/fix-markup-in-predicate-functi…
Browse files Browse the repository at this point in the history
…on-names
  • Loading branch information
rrrene authored Jan 11, 2024
2 parents 44587f2 + 8e21e7c commit 13e2dd7
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/credo/check/readability/predicate_function_names.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ defmodule Credo.Check.Readability.PredicateFunctionNames do
* For functions, they should end in a question mark.
# preferred
# preferred
defp user?(cookie) do
end
defp user?(cookie) do
end
defp has_attachment?(mail) do
end
defp has_attachment?(mail) do
end
# NOT preferred
# NOT preferred
defp is_user?(cookie) do
end
defp is_user?(cookie) do
end
defp is_user(cookie) do
end
defp is_user(cookie) do
end
* For guard-safe macros they should have the prefix `is_` and not end in a question mark.
# preferred
# preferred
defmacro is_user(cookie) do
end
defmacro is_user(cookie) do
end
# NOT preferred
# NOT preferred
defmacro is_user?(cookie) do
end
defmacro is_user?(cookie) do
end
defmacro user?(cookie) do
end
defmacro user?(cookie) do
end
Like all `Readability` issues, this one is not a technical concern.
But you can improve the odds of others reading and liking your code by making
Expand Down

0 comments on commit 13e2dd7

Please sign in to comment.