Skip to main content

mdlint/
types.rs

1use std::path::PathBuf;
2
3#[derive(Debug, Clone)]
4pub struct FileResult {
5    pub path: PathBuf,
6    pub violations: Vec<Violation>,
7    /// Source lines (1-indexed by line number) used for snippet display.
8    /// May be empty if source is not available.
9    pub source_lines: Vec<String>,
10}
11
12#[derive(Debug, Clone)]
13pub struct Violation {
14    pub line: usize,
15    pub column: Option<usize>,
16    pub rule: String,
17    pub message: String,
18    pub fix: Option<Fix>,
19}
20
21#[derive(Debug, Clone)]
22pub struct Fix {
23    pub line_start: usize,
24    pub line_end: usize,
25    pub column_start: Option<usize>,
26    pub column_end: Option<usize>,
27    pub replacement: String,
28    pub description: String,
29}