code_passenger 0.4.2

Scans a Rust workspace with klepto and does the writing: feature gates across every crate from one features document, proven by cargo check, Cargo.toml edits, file headers from the plan, and the history of it.
Documentation
use super::{
    action::Action,
    state::{AnalysisState, Finding},
};
use crate::engine::EngineOutput;

pub trait Rule: Send + Sync {
    fn id(&self) -> &'static str;
    fn findings(&self, raw: &EngineOutput, st: &AnalysisState) -> Vec<Finding>;
}

pub fn run_rules(raw: &EngineOutput, st: &AnalysisState, rules: &[Box<dyn Rule>]) -> Vec<Action> {
    let mut out = Vec::new();
    for r in rules {
        let fs = r.findings(raw, st);
        if !fs.is_empty() {
            out.push(Action::AddFindings(fs));
        }
    }
    out.push(Action::SetPhase(super::state::Phase::ChecksRun));
    out
}