pub struct LintRequest<'a> {
pub top_level: &'a Path,
pub options: &'a MarkdownAutofixOptions,
pub path: &'a [u8],
pub source: &'a [u8],
}Expand description
What:
One candidate for the linter.
'a names how long the borrowed parts last.
Why:
The linter runs from the top level,
so .lfsconfig,
.gitattributes and linked
images resolve as they do for the person,
and lints source as the file at path.
In TS you’d write (pseudocode):
type LintRequest = { topLevel: string; options: MarkdownAutofixOptions; path: Uint8Array; source: Uint8Array };Fields§
§top_level: &'a PathThe repository’s top level, the linter’s working directory.
options: &'a MarkdownAutofixOptionsThe policy’s rules and exclude patterns.
path: &'a [u8]The candidate’s pathname, relative to the top level, as Git’s raw bytes.
source: &'a [u8]The candidate’s bytes, already known to be UTF-8.
Trait Implementations§
Source§impl<'a> Clone for LintRequest<'a>
impl<'a> Clone for LintRequest<'a>
impl<'a> Copy for LintRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for LintRequest<'a>
impl<'a> RefUnwindSafe for LintRequest<'a>
impl<'a> Send for LintRequest<'a>
impl<'a> Sync for LintRequest<'a>
impl<'a> Unpin for LintRequest<'a>
impl<'a> UnsafeUnpin for LintRequest<'a>
impl<'a> UnwindSafe for LintRequest<'a>
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> 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