Skip to main content

testing_conventions/
violation.rs

1//! The shared `Violation` type emitted by the deterministic test-code lints.
2
3use std::path::PathBuf;
4
5/// A single lint violation found in a test file.
6#[derive(Debug, Clone, PartialEq, Eq)]
7pub struct Violation {
8    pub file: PathBuf,
9    /// 1-based line number of the offending construct.
10    pub line: usize,
11    /// Short lint identifier (e.g. `no-monkeypatch`, `no-out-of-module-call`).
12    pub rule: &'static str,
13    pub message: String,
14}