#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ViolationKind {
PathPrefix {
prefix: String,
rendered_path: String,
},
GlobImport {
base_path: String,
},
MethodCall {
name: String,
syntax: &'static str,
},
MacroCall {
name: String,
},
FunctionCall {
rendered_path: String,
},
ItemKind { kind: &'static str, name: String },
Derive {
trait_name: String,
item_name: String,
},
LayerViolation {
from_layer: String,
to_layer: String,
imported_path: String,
},
UnmatchedLayer {
file: String,
},
ForbiddenEdge {
reason: String,
imported_path: String,
},
TraitContract {
trait_name: String,
check: &'static str,
detail: String,
},
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MatchLocation {
pub file: String,
pub line: usize,
pub column: usize,
pub kind: ViolationKind,
}