Credo.Check.Readability.PredicateFunctionNames

This check was recently improved in Credo and it does make sense for readability.

The offending functions in Pleroma have been renamed and a couple missing the ? suffix have been fixed as well.
This commit is contained in:
Mark Felder 2024-01-26 16:55:08 -05:00
commit 5b95abaeea
35 changed files with 150 additions and 150 deletions

View file

@ -372,7 +372,7 @@ defmodule Pleroma.Web.CommonAPI do
do: visibility in ~w(public unlisted)
def public_announce?(object, _) do
Visibility.is_public?(object)
Visibility.public?(object)
end
def get_visibility(_, _, %Participation{}), do: {"direct", "direct"}
@ -500,7 +500,7 @@ defmodule Pleroma.Web.CommonAPI do
end
defp activity_is_public(activity) do
with false <- Visibility.is_public?(activity) do
with false <- Visibility.public?(activity) do
{:error, :visibility_error}
end
end