# `Safe.Config`
[🔗](https://github.com/erlang-solutions/safe-mix-plugin/blob/main/lib/mix/tasks/safe/config.ex#L1)

Generates the SAFE JSON configuration from the Mix project structure.

Generates `.safe/config.json` for the SAFE scanner.

# `config_path`

Returns the path to the SAFE config file for the given project.

# `longest_common_prefix`

Finds the longest common directory prefix shared by all `paths`.

Each path is split into segments; shared leading segments are rejoined.
Returns an empty string when `paths` is empty or no segments are shared.

# `make_config`

Generates the SAFE JSON config string from the live Mix project.

Returns `{:ok, json_string}`. Does not write to disk.

# `read_config`

Reads `.safe/config.json` from the project directory.

Returns `{:ok, json_string}` or `{:error, {:config_read_error, reason}}`.

# `write_config`

Writes `json` to `.safe/config.json` in the project directory.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
