pub enum BuiltinLintMode {
Diagnostics,
FormatCheck,
}Expand description
How a built-in tool answers the question “is this code block ok?” in a lint slot.
Variants§
Diagnostics
The tool is a linter: run its command and parse the diagnostics it prints.
FormatCheck
The tool is a formatter: run it and compare its output with the block. A difference is the finding.
Formatters are not asked for a check flag. Their check modes disagree on every
axis that matters here: some exit non-zero, some exit zero and print a diff,
some ignore the flag entirely when it follows the stdin argument, and some
reject it alongside the stdin-filename argument they also require. Comparing
the formatted result with the input is exact, needs no per-tool flag, and gives
the same answer rumdl fmt would act on.
Trait Implementations§
Source§impl Clone for BuiltinLintMode
impl Clone for BuiltinLintMode
Source§fn clone(&self) -> BuiltinLintMode
fn clone(&self) -> BuiltinLintMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BuiltinLintMode
Source§impl Debug for BuiltinLintMode
impl Debug for BuiltinLintMode
impl Eq for BuiltinLintMode
Source§impl PartialEq for BuiltinLintMode
impl PartialEq for BuiltinLintMode
impl StructuralPartialEq for BuiltinLintMode
Auto Trait Implementations§
impl Freeze for BuiltinLintMode
impl RefUnwindSafe for BuiltinLintMode
impl Send for BuiltinLintMode
impl Sync for BuiltinLintMode
impl Unpin for BuiltinLintMode
impl UnsafeUnpin for BuiltinLintMode
impl UnwindSafe for BuiltinLintMode
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<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
Compare self to
key and return true if they are equal.