Skip to main content

save_baseline_to_config

Function save_baseline_to_config 

Source
pub fn save_baseline_to_config(
    config_path: &Path,
    counts: &CheckCounts,
    output: OutputFormat,
) -> Result<(), ExitCode>
Expand description

Save regression baseline counts into the project’s config file.

Reads the existing config, adds/updates the regression.baseline section, and writes it back. For JSONC files, comments are preserved using a targeted insertion/replacement strategy.

§Errors

Returns an error if the config file cannot be read, updated, or written back.