Enum slicec::diagnostics::Lint
source · pub enum Lint {
DuplicateFile {
path: String,
},
Deprecated {
identifier: String,
reason: Option<String>,
},
MalformedDocComment {
message: String,
},
IncorrectDocComment {
message: String,
},
BrokenDocLink {
message: String,
},
}Variants§
DuplicateFile
An input filename was provided multiple times.
Note: it’s valid to specify the same path as a source and reference file (ex: slicec foo.slice -R foo.slice).
This is only triggered by specifying it multiple times in the same context: (ex: slicec foo.slice foo.slice).
Deprecated
Fields
A deprecated Slice element was used.
MalformedDocComment
A syntactical mistake in a doc-comment.
IncorrectDocComment
A doc comment contains an incorrect tag. Either:
- The tag itself is incorrect. Ex: using
@throwson an element that can’t or doesn’t throw an exception. - The tag describes something incorrect. Ex: specifying
@param foowhen no parameter named “foo” exists.
BrokenDocLink
A link in a doc-comment couldn’t be resolved. Either:
- The link pointed to an un-linkable element, e.g. a module, result, sequence, dictionary, or primitive.
- The link pointed to a non-existent element.
Implementations§
source§impl Lint
impl Lint
sourcepub fn get_default_level(&self) -> DiagnosticLevel
pub fn get_default_level(&self) -> DiagnosticLevel
Returns the default diagnostic level this lint should use when reporting violations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lint
impl RefUnwindSafe for Lint
impl Send for Lint
impl Sync for Lint
impl Unpin for Lint
impl UnwindSafe for Lint
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