pub struct Finding {Show 13 fields
pub rule_id: String,
pub file: PathBuf,
pub start_line: usize,
pub start_col: usize,
pub end_line: usize,
pub end_col: usize,
pub start_byte: usize,
pub end_byte: usize,
pub message: String,
pub severity: Severity,
pub matched_text: String,
pub fix: Option<String>,
pub captures: HashMap<String, String>,
}Expand description
A finding from running a rule.
Fields§
§rule_id: StringID of the rule that produced this finding.
file: PathBufAbsolute path to the file where the finding was detected.
start_line: usize1-based line number of the start of the match.
start_col: usize0-based column of the start of the match.
end_line: usize1-based line number of the end of the match.
end_col: usize0-based column of the end of the match.
start_byte: usizeByte offset of the start of the match in the source file.
end_byte: usizeByte offset of the end of the match in the source file.
message: StringHuman-readable description of the finding.
severity: SeveritySeverity level of the finding.
matched_text: StringThe source text of the matched node.
fix: Option<String>Auto-fix template (None if no fix available).
captures: HashMap<String, String>Capture values from the query match keyed by capture name (without @).
Includes all named captures from the query; @match is NOT included —
use matched_text for the full matched node text instead.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request