Skip to main content

read_and_validate_config

Function read_and_validate_config 

Source
pub fn read_and_validate_config() -> Result<OsedaConfig, OsedaCheckError>
Expand description

Reads and validates an oseda-config.json file in the working directory

This checks a few things:

  • the file exists and parses correctly
  • the git user.name matches the config author (unless –skip-git is passed)
  • the config title matches the name of the working directory

§Arguments

  • skip_git - skips the git author validation, primarily used for CI, not by the end user hopefully lol

§Returns

  • Ok(OsedaConfig) if the file is valid and all checks pass
  • Err(OsedaCheckError) if any check fails