View Source Recode.Config (Recode v0.6.5)
Functions to read and merge the Recode
configuration.
Summary
Types
@type config() :: keyword()
Functions
@spec default() :: config()
Returns the default configuration.
Merges two configs into one.
The merge will do a deep merge. The merge will do a deep merge. The merge
takes the version from the right
config.
Examples
iex> new = [version: "0.0.2", verbose: false, autocorrect: true]
...> old = [version: "0.0.1", verbose: true]
iex> Recode.Config.merge(new ,old)
[{:autocorrect, true}, {:verbose, true}, {:version, "0.0.2"}]
Reads the Recode
cofiguration from the given path
.
Returns the given config as a formatted string with comments.
@spec validate(config()) :: :ok | {:error, :out_of_date | :no_tasks}
Validates the config version and tasks.