Skip to main content

load_config

Function load_config 

Source
pub fn load_config(
    project_root: &Path,
    trust: ProjectTrust,
) -> Result<LoadedConfig, ConfigError>
Expand description

Load configuration with hierarchical resolution.

Resolution order (later overrides earlier):

  1. ~/.config/slopguard/config.toml (global defaults)
  2. slopguard.toml at project_root (project overrides)

Unless trust is ProjectTrust::Trusted, the project file cannot set the user-only keys ([ai], [git], [fix], scan.cache_dir) and its rule paths must stay inside project_root. See load_config_from.