mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
Dialyzer: First set alias definitions and then use them in @type
This commit is contained in:
parent
5bb94f1d9e
commit
6542a70c05
@ -7,12 +7,13 @@ defmodule Ejabberd.Config.EjabberdModule do
|
||||
the already existing Elixir.Module.
|
||||
"""
|
||||
|
||||
@type t :: %{module: atom, attrs: [Attr.t]}
|
||||
|
||||
defstruct [:module, :attrs]
|
||||
|
||||
alias Ejabberd.Config.EjabberdModule
|
||||
alias Ejabberd.Config.Validation
|
||||
alias Ejabberd.Config.Attr
|
||||
|
||||
@type t :: %{module: atom, attrs: [Attr.attr]}
|
||||
|
||||
defstruct [:module, :attrs]
|
||||
|
||||
@doc """
|
||||
Given a list of modules / single module
|
||||
|
@ -3,12 +3,12 @@ defmodule Ejabberd.Config.Validation do
|
||||
Module used to validate a list of modules.
|
||||
"""
|
||||
|
||||
@type mod_validation :: {[EjabberdModule.t], EjabberdModule.t, map}
|
||||
@type mod_validation_result :: {:ok, EjabberdModule.t} | {:error, EjabberdModule.t, map}
|
||||
|
||||
alias Ejabberd.Config.EjabberdModule
|
||||
alias Ejabberd.Config.Validator
|
||||
|
||||
@type mod_validation :: {[EjabberdModule.t], EjabberdModule.t, map}
|
||||
@type mod_validation_result :: {:ok, EjabberdModule.t} | {:error, EjabberdModule.t, map}
|
||||
|
||||
@doc """
|
||||
Given a module or a list of modules it runs validators on them
|
||||
and returns {:ok, mod} or {:error, mod, errors}, for each
|
||||
|
@ -3,11 +3,12 @@ defmodule Ejabberd.Config.Validator.Attrs do
|
||||
Validator module used to validate attributes.
|
||||
"""
|
||||
|
||||
# TODO: Duplicated from validator.ex !!!
|
||||
@type mod_validation :: {[EjabberdModule.t], EjabberdModule.t, map}
|
||||
|
||||
import Ejabberd.Config.ValidatorUtility
|
||||
alias Ejabberd.Config.Attr
|
||||
alias Ejabberd.Config.EjabberdModule
|
||||
|
||||
# TODO: Duplicated from validator.ex !!!
|
||||
@type mod_validation :: {[EjabberdModule.t], EjabberdModule.t, map}
|
||||
|
||||
@doc """
|
||||
Given a module (with the form used for validation)
|
||||
|
@ -4,6 +4,8 @@ defmodule Ejabberd.Config.Validator.Dependencies do
|
||||
with the @dependency annotation.
|
||||
"""
|
||||
|
||||
alias Ejabberd.Config.EjabberdModule
|
||||
|
||||
# TODO: Duplicated from validator.ex !!!
|
||||
@type mod_validation :: {[EjabberdModule.t], EjabberdModule.t, map}
|
||||
import Ejabberd.Config.ValidatorUtility
|
||||
|
Loading…
Reference in New Issue
Block a user