Skip to main content

trueno_ptx_debug/bugs/
mod.rs

1//! Bug class definitions and registry
2
3mod registry;
4
5pub use registry::{BugClass, BugPattern, BugRegistry};
6
7/// Severity levels for bugs
8#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
9pub enum Severity {
10    /// Low severity - performance or style issue
11    Low,
12    /// Medium severity - potential correctness issue
13    Medium,
14    /// High severity - likely causes incorrect behavior
15    High,
16    /// Critical severity - causes crashes or data corruption
17    Critical,
18}
19
20impl std::fmt::Display for Severity {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22        match self {
23            Severity::Low => write!(f, "LOW"),
24            Severity::Medium => write!(f, "MEDIUM"),
25            Severity::High => write!(f, "HIGH"),
26            Severity::Critical => write!(f, "CRITICAL"),
27        }
28    }
29}