Generates the SAFE JSON configuration from the Mix project structure.
Generates .safe/config.json for the SAFE scanner.
Summary
Functions
Returns the path to the SAFE config file for the given project.
Finds the longest common directory prefix shared by all paths.
Generates the SAFE JSON config string from the live Mix project.
Reads .safe/config.json from the project directory.
Writes json to .safe/config.json in the project directory.
Functions
Returns the path to the SAFE config file for the given project.
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.
Generates the SAFE JSON config string from the live Mix project.
Returns {:ok, json_string}. Does not write to disk.
Reads .safe/config.json from the project directory.
Returns {:ok, json_string} or {:error, {:config_read_error, reason}}.
Writes json to .safe/config.json in the project directory.