use crate::profile::Severity;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RuleCategory {
Keyword,
Restriction,
Structural,
Semantic,
}
impl RuleCategory {
pub fn as_str(&self) -> &'static str {
match self {
RuleCategory::Keyword => "keyword",
RuleCategory::Restriction => "restriction",
RuleCategory::Structural => "structural",
RuleCategory::Semantic => "semantic",
}
}
}
#[derive(Debug, Clone)]
pub struct RuleMetadata {
pub name: String,
pub code: String,
pub description: String,
pub rationale: String,
pub severity: Severity,
pub category: RuleCategory,
pub bad_example: String,
pub good_example: String,
pub see_also: Vec<String>,
pub profile: Option<String>,
}