Skip to main content

validate_templates

Function validate_templates 

Source
pub fn validate_templates(manifest_dir: &str) -> Result<()>
Expand description

Validate that each template in a battery pack generates a project that compiles and passes tests.

For each template declared in the battery pack’s metadata:

  1. Generates a project into a temporary directory
  2. Runs cargo check to verify it compiles
  3. Runs cargo test to verify tests pass

Compiled artifacts are cached in <target_dir>/bp-validate/ so that subsequent runs are faster.