pub struct LintResult {
pub file_path: String,
pub failures: Vec<CheckFailure>,
pub parse_errors: Vec<String>,
pub error_count: usize,
pub warning_count: usize,
pub fixable_error_count: usize,
pub fixable_warning_count: usize,
}Expand description
Result of linting a Docker Compose file.
Fields§
§file_path: StringThe file path that was linted.
failures: Vec<CheckFailure>Rule violations found.
parse_errors: Vec<String>Parse errors (if any).
error_count: usizeNumber of errors.
warning_count: usizeNumber of warnings.
fixable_error_count: usizeNumber of fixable errors.
fixable_warning_count: usizeNumber of fixable warnings.
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, threshold: Severity) -> bool
pub fn should_fail(&self, threshold: Severity) -> bool
Check if the results should cause a non-zero exit.
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 moreAuto 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 moreCreates a shared type from an unshared type.