pub struct Report {
pub errors: Vec<Finding>,
pub warnings: Vec<Finding>,
pub fixes: Vec<FixOp>,
}Expand description
Report holds the errors, the warnings, and the fixes of a run.
Fields§
§errors: Vec<Finding>The errors, which finish orders by path, then by line.
warnings: Vec<Finding>The warnings, which finish orders as it orders the errors.
fixes: Vec<FixOp>The fixes, which finish orders with the moves first, then the created
files, then the rewritten files, each group by path.
Implementations§
Source§impl Report
impl Report
Sourcepub fn push(&mut self, finding: Finding)
pub fn push(&mut self, finding: Finding)
push adds a finding to the errors or to the warnings, according to its
severity. The report drops the finding’s rule_line, which the report
doesn’t print and the cache doesn’t store, so that a finding read from
the cache equals the same finding made fresh.
Sourcepub fn extend(&mut self, findings: impl IntoIterator<Item = Finding>)
pub fn extend(&mut self, findings: impl IntoIterator<Item = Finding>)
extend adds every finding in findings, as push adds one.
Sourcepub fn finish(self) -> Self
pub fn finish(self) -> Self
finish orders the findings by path, then by line, removes duplicate
findings and fixes, and orders the fixes as CLI-4_AC-6 lists them.
Sourcepub fn filter(&self, scope: &Scope) -> Report
pub fn filter(&self, scope: &Scope) -> Report
filter returns a report of the findings in scope. It keeps every
fix, whatever its path.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
has_errors returns whether the run found an error.
Trait Implementations§
impl Eq for Report
Source§impl From<&Report> for ValidateReport
impl From<&Report> for ValidateReport
impl StructuralPartialEq for Report
Auto Trait Implementations§
impl Forget for Report
impl Freeze for Report
impl Move for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Report
impl UnwindSafe for Report
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.