pub struct LintResult {
pub failures: Vec<CheckFailure>,
pub parse_errors: Vec<String>,
}Expand description
Result of linting a Dockerfile.
Fields§
§failures: Vec<CheckFailure>Rule violations found.
parse_errors: Vec<String>Parse errors (if any).
Implementations§
Source§impl LintResult
impl LintResult
Sourcepub fn has_failures(&self) -> bool
pub fn has_failures(&self) -> bool
Check if there are any failures.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if there are any errors (failure with Error severity).
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Check if there are any warnings (failure with Warning severity).
Sourcepub fn max_severity(&self) -> Option<Severity>
pub fn max_severity(&self) -> Option<Severity>
Get the maximum severity in the results.
Sourcepub fn should_fail(&self, config: &HadolintConfig) -> bool
pub fn should_fail(&self, config: &HadolintConfig) -> bool
Check if the results should cause a non-zero exit.
Sourcepub fn filter_by_threshold(&mut self, threshold: Severity)
pub fn filter_by_threshold(&mut self, threshold: Severity)
Filter failures by severity threshold.
Trait Implementations§
Source§impl Clone for LintResult
impl Clone for LintResult
Source§fn clone(&self) -> LintResult
fn clone(&self) -> LintResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LintResult
impl Debug for LintResult
Auto Trait Implementations§
impl Freeze for LintResult
impl RefUnwindSafe for LintResult
impl Send for LintResult
impl Sync for LintResult
impl Unpin for LintResult
impl UnwindSafe for LintResult
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
Mutably borrows from an owned value. Read more
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more