pub enum Surfaces {
LintAndFix,
FixOnly,
}Expand description
Which of htl’s two rule-name surfaces a rule appears on.
Two things in htl take a rule by name and they do not take the same set. One is the
lint surface — htl check --list-lints, [lint.rules], --lint, HTL_LINTS, and the
-- htl: allow(...) comment — which answers “is this said, and does it stop the run”.
The other is the fix surface — htl fix --rule, [fix] disable, [fix] unsafe —
which answers “may a tool rewrite this”. The two questions are independent (a level
never decides applicability and applicability never decides a level), and [lint] and
[fix] stay two tables; what this says is only which names each table may contain.
Variants§
LintAndFix
Both. A rule some check reports under: the listing prints it with its default level, a spec sets that level, an allow comment silences one occurrence — and a fix filter names it too, because a finding under it may carry a fix.
FixOnly
The fix surface alone. A class htl fix gives to a Teal error that has no rule of
its own: nothing in a check reports under the name, so there is no level for a
project to set, nothing for the listing to print and nothing an allow comment
could silence. htl fix --rule and [fix] disable still have to name it, which is
why it is a registered rule rather than a bare string in fix.rs.
Trait Implementations§
impl Copy for Surfaces
impl Eq for Surfaces
impl StructuralPartialEq for Surfaces
Auto Trait Implementations§
impl Freeze for Surfaces
impl RefUnwindSafe for Surfaces
impl Send for Surfaces
impl Sync for Surfaces
impl Unpin for Surfaces
impl UnsafeUnpin for Surfaces
impl UnwindSafe for Surfaces
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<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
key and return true if they are equal.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> ⓘ
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> ⓘ
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