Struct biome_suppression::Suppression
source · pub struct Suppression<'a> {
pub categories: Vec<(&'a Category, Option<&'a str>)>,
pub reason: &'a str,
}
Expand description
Single instance of a suppression comment, with the following syntax:
// rome-ignore { <category> { (<value>) }? }+: <reason>
The category broadly describes what feature is being suppressed (formatting, linting, …) with the value being and optional, category-specific name of a specific element to disable (for instance a specific lint name). A single suppression may specify one or more categories + values, for instance to disable multiple lints at once
A suppression must specify a reason: this part has no semantic meaning but is required to document why a particular feature is being disable for this line (lint false-positive, specific formatting requirements, …)
Fields§
§categories: Vec<(&'a Category, Option<&'a str>)>
List of categories for this suppression
Categories are pair of the category name + an optional category value
reason: &'a str
Reason for this suppression comment to exist
Trait Implementations§
source§impl<'a> Debug for Suppression<'a>
impl<'a> Debug for Suppression<'a>
source§impl<'a> PartialEq for Suppression<'a>
impl<'a> PartialEq for Suppression<'a>
source§fn eq(&self, other: &Suppression<'a>) -> bool
fn eq(&self, other: &Suppression<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.impl<'a> Eq for Suppression<'a>
impl<'a> StructuralPartialEq for Suppression<'a>
Auto Trait Implementations§
impl<'a> Freeze for Suppression<'a>
impl<'a> RefUnwindSafe for Suppression<'a>
impl<'a> Send for Suppression<'a>
impl<'a> Sync for Suppression<'a>
impl<'a> Unpin for Suppression<'a>
impl<'a> UnwindSafe for Suppression<'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
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
key
and return true
if they are equal.