Skip to main content

normalize

Function normalize 

Source
pub fn normalize(raw: RawPolicy) -> Result<(Policy, Vec<String>)>
Expand description

Normalize a validated RawPolicy into the stable Policy model.

Applies all defaults and validates semantic constraints: valid glob patterns, valid role names, known output target IDs.

Returns the normalized policy and a list of diagnostic warnings. Warnings are non-fatal but indicate configuration that should be cleaned up (e.g. listing output files redundantly in paths.generated).

ยงErrors

Returns Error::InvalidRoleName for role names with disallowed characters, Error::Glob for malformed glob patterns, Error::UnknownTarget for unrecognized output target IDs, or Error::NoOutputs if the resolved outputs list is empty.