Struct deno_lint::diagnostic::LintDiagnostic
source · pub struct LintDiagnostic {
pub specifier: ModuleSpecifier,
pub range: SourceRange,
pub text_info: SourceTextInfo,
pub message: String,
pub code: String,
pub hint: Option<String>,
pub fixes: Vec<LintFix>,
}
Fields§
§specifier: ModuleSpecifier
§range: SourceRange
§text_info: SourceTextInfo
§message: String
§code: String
§hint: Option<String>
§fixes: Vec<LintFix>
Fixes that should be shown in the Deno LSP and also
used for the deno lint --fix
flag.
Note: If there are multiple fixes for a diagnostic then
only the first fix will be used for the --fix
flag, but
multiple will be shown in the LSP.
Trait Implementations§
source§impl Clone for LintDiagnostic
impl Clone for LintDiagnostic
source§fn clone(&self) -> LintDiagnostic
fn clone(&self) -> LintDiagnostic
Returns a copy 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 Diagnostic for LintDiagnostic
impl Diagnostic for LintDiagnostic
source§fn level(&self) -> DiagnosticLevel
fn level(&self) -> DiagnosticLevel
The level of the diagnostic.
source§fn code(&self) -> Cow<'_, str>
fn code(&self) -> Cow<'_, str>
The diagnostic code, like
no-explicit-any
or ban-untagged-ignore
.source§fn location(&self) -> DiagnosticLocation<'_>
fn location(&self) -> DiagnosticLocation<'_>
The location this diagnostic is associated with.
source§fn snippet(&self) -> Option<DiagnosticSnippet<'_>>
fn snippet(&self) -> Option<DiagnosticSnippet<'_>>
A snippet showing the source code associated with the diagnostic.
source§fn snippet_fixed(&self) -> Option<DiagnosticSnippet<'_>>
fn snippet_fixed(&self) -> Option<DiagnosticSnippet<'_>>
A snippet showing how the diagnostic can be fixed.
fn info(&self) -> Cow<'_, [Cow<'_, str>]>
source§fn docs_url(&self) -> Option<Cow<'_, str>>
fn docs_url(&self) -> Option<Cow<'_, str>>
An optional URL to the documentation for the diagnostic.
fn display(&self) -> DiagnosticDisplay<'_, Self>
Auto Trait Implementations§
impl Freeze for LintDiagnostic
impl RefUnwindSafe for LintDiagnostic
impl Send for LintDiagnostic
impl Sync for LintDiagnostic
impl Unpin for LintDiagnostic
impl UnwindSafe for LintDiagnostic
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> 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