#[derive(Debug, Clone, PartialEq)]
pub struct Location {
pub line: usize,
pub column: usize,
pub offset: usize,
}
#[derive(Debug, Clone, PartialEq)]
pub enum Severity {
Error,
Warning,
Info,
}
#[derive(Debug, Clone, PartialEq)]
pub enum AntiPattern {
FormatHeredoc { location: Location, format_name: String, heredoc_delimiter: String },
BeginTimeHeredoc { location: Location, heredoc_content: String, side_effects: Vec<String> },
DynamicHeredocDelimiter { location: Location, expression: String },
SourceFilterHeredoc { location: Location, module: String },
RegexCodeBlockHeredoc { location: Location },
EvalStringHeredoc { location: Location },
TiedHandleHeredoc { location: Location, handle_name: String },
}
#[derive(Debug, Clone, PartialEq)]
pub struct Diagnostic {
pub severity: Severity,
pub pattern: AntiPattern,
pub message: String,
pub explanation: String,
pub suggested_fix: Option<String>,
pub references: Vec<String>,
}