use super::context::Ctx;
use super::finding::Finding;
pub struct RuleInfo {
pub id: &'static str,
pub title: &'static str,
pub explain: &'static str,
pub on_commit: bool,
}
pub trait Rule: Sync {
fn info(&self) -> &RuleInfo;
fn run(&self, ctx: &Ctx, out: &mut Vec<Finding>);
}
pub fn skipped(doc: &crate::model::Doc, rule: &str) -> bool {
doc.list_field("check_skip").iter().any(|r| r == rule)
}