Files
wrkflw/crates/evaluator
bahdotsh 30f405ccb9 fix(evaluator): remove incorrect name field requirement validation
The 'name' field is optional per GitHub Actions specification. When omitted,
GitHub displays the workflow file path relative to the repository root.

This change removes the validation logic that incorrectly enforced the name
field as required, aligning the validator with the official JSON schema
which only requires 'on' and 'jobs' fields at the root level.

Fixes #50
2025-08-21 22:45:36 +05:30
..
2025-08-13 18:07:11 +05:30

wrkflw-evaluator

Small, focused helper for statically evaluating GitHub Actions workflow files.

  • Purpose: Fast structural checks (e.g., name, on, jobs) before deeper validation/execution
  • Used by: wrkflw CLI and TUI during validation flows

Example

use std::path::Path;

let result = wrkflw_evaluator::evaluate_workflow_file(
    Path::new(".github/workflows/ci.yml"),
    /* verbose */ true,
).expect("evaluation failed");

if result.is_valid {
    println!("Workflow looks structurally sound");
} else {
    for issue in result.issues {
        println!("- {}", issue);
    }
}

Notes

  • This crate focuses on structural checks; deeper rules live in wrkflw-validators.
  • Most consumers should prefer the top-level wrkflw CLI for end-to-end UX.