View Source Workspace.Checks.ValidateConfigPath (Workspace v0.1.0)
Checks that the given path is properly configured
Common use case
This is useful in cases you want to specify a common path for some of your project's artifacts, e.g.
deps_path
orbuild_path
. This will check that the configuration option of the given project matches the expected path. Notice that the expected path is always considered to be relative to the project's workspace path.
Configuration
:config_attribute
- Required. The configuration attribute to check. This can either be a single atom or a list of atoms for nested config options.:expected_path
- Relative path with respect to the workspace root. This can either be a relative path with respect to workspace root or an anonymous function taking as input aWorkspace.Project
and returning a dynamic expected path.
Example
In order to configure this checker add the following, under checkers
,
in your workspace.exs
:
[
checker: Workspace.Checkers.ConfigPath,
config_attribute: :deps_path,
expected_path: "artifacts/deps"
]