Skip to content
  • feld's avatar
    Pleroma.User: dialyzer errors · a2664927
    feld authored
    lib/pleroma/user.ex:757:no_return
    Function register_changeset/1 has no local return.
    ________________________________________________________________________________
    lib/pleroma/user.ex:757:no_return
    Function register_changeset/2 has no local return.
    ________________________________________________________________________________
    lib/pleroma/user.ex:757:no_return
    Function register_changeset/3 has no local return.
    ________________________________________________________________________________
    lib/pleroma/user.ex:778:call
    The function call will not succeed.
    
    Pleroma.User.approval_changeset(
      %Ecto.Changeset{
        :action => atom(),
        :changes => %{atom() => _},
        :constraints => [
          %{
            :constraint =>
              binary()
              | %Regex{
                  :opts => binary() | [any()],
                  :re_pattern => _,
                  :re_version => _,
                  :source => binary()
                },
            :error_message => binary(),
            :error_type => atom(),
            :field => atom(),
            :match => :exact | :prefix | :suffix,
            :type => :check | :exclusion | :foreign_key | :unique
          }
        ],
        :data => nil | map(),
        :empty_values => _,
        :errors => Keyword.t({binary(), Keyword.t()}),
        :filters => %{atom() => _},
        :params => nil | %{binary() => _},
        :prepare => [(_ -> any())],
        :repo => atom(),
        :repo_opts => Keyword.t(),
        :required => [atom()],
        :types =>
          nil
          | %{
              atom() =>
                atom()
                | {:array | :assoc | :embed | :in | :map | :maybe | :param, _}
                | {:parameterized, atom(), _}
            },
        :valid? => boolean(),
        :validations => Keyword.t()
      },
      [{:set_approval, _}, ...]
    )
    
    breaks the contract
    (t(), :elixir.keyword()) :: Ecto.Changeset.t()
    
    ________________________________________________________________________________
    lib/pleroma/user.ex:854:unused_fun
    Function maybe_validate_required_birthday/1 will never be called.
    a2664927