use serde::Serialize;
use crate::config::ValidationConfig;
use crate::error::ValidationError;
use crate::graph::KnowledgeGraph;
use crate::model::Item;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum Severity {
Error,
Warning,
}
pub trait ValidationRule: Send + Sync {
fn pre_validate(&self, _items: &[Item], _config: &ValidationConfig) -> Vec<ValidationError> {
Vec::new()
}
fn validate(
&self,
_graph: &KnowledgeGraph,
_config: &ValidationConfig,
) -> Vec<ValidationError> {
Vec::new()
}
fn severity(&self) -> Severity {
Severity::Error
}
}