KogenCredo.CoreSupport.Settings (KogenCredo v0.1.0)
View SourceStrict parameter validation for checks.
A mistyped threshold ("400"), a bare string where a path list is expected or a
module given as a string must stop the run with an ArgumentError; silently
treating it as "nothing configured" would look like a green run.
Summary
Functions
Requires a list of atoms (modules or names).
Fetches key and requires an integer >= min.
Requires a keyword list or map with only the allowed keys.
The name of one module reference given as an atom (MyApp.Codec, :ets) or as a string
("MyApp.Codec", "Elixir.MyApp.Codec", ":ets"), or nil when it is neither. For helpers
that take either form; check parameters go through modules!/2.
Requires a list of module atoms (MyApp.Codec, :ets) and returns their names.
Requires a list of binaries.
Functions
Requires a list of atoms (modules or names).
Fetches key and requires an integer >= min.
Requires a keyword list or map with only the allowed keys.
@spec module_name(term()) :: KogenCredo.CoreSupport.Ast.module_name() | nil
The name of one module reference given as an atom (MyApp.Codec, :ets) or as a string
("MyApp.Codec", "Elixir.MyApp.Codec", ":ets"), or nil when it is neither. For helpers
that take either form; check parameters go through modules!/2.
@spec modules!(term(), atom()) :: [KogenCredo.CoreSupport.Ast.module_name()]
Requires a list of module atoms (MyApp.Codec, :ets) and returns their names.
Configuration names modules with atoms, and a string is still rejected (a mistyped list must
not look like "nothing configured"). The atoms are only read: they come from the config, never
from the analysed code, and the result is compared by name (see t:Ast.module_name/0).
Requires a list of binaries.