pub fn load_context(
root: &Path,
rules_path: Option<PathBuf>,
) -> Result<CheckContext>Expand description
Load and compile the rules file, open the index, and validate.
rules_path defaults to rules::DEFAULT_RULES_PATH under root.
Errors (missing or invalid rules file, unknown/overlapping layers,
missing index) map to exit code 2 in the CLI.