pub fn load_config_validated(
start_dir: &Path,
) -> AnalysisValidation<DebtmapConfig>Expand description
Load and validate config using error accumulation.
This function reads the config file and validates it, accumulating ALL errors instead of failing at the first one.
§Example
ⓘ
use debtmap::config::loader::load_config_validated;
use std::path::Path;
let validation = load_config_validated(Path::new("project/"));
// Check all errors at once
match validation {
stillwater::Validation::Success(config) => {
// Use config
}
stillwater::Validation::Failure(errors) => {
// Show ALL errors to user
for error in errors {
eprintln!(" - {}", error);
}
}
}