Skip to main content

load

Function load 

pub fn load(path: &Path) -> Result<DefectArtifact>
Expand description

Read and validate a defect-calibration artifact from path.

§Errors

CodeLoreError::RepoIo (read-side input, exit 3) when the file cannot be read; CodeLoreError::Analysis (exit 4) when the JSON is malformed or format_version does not match DEFECT_FORMAT_VERSION — the error message names both versions. An explicitly passed --defect-calibration file that cannot be used is a configuration mistake, not a degradable state, so both failure modes are hard errors.