#[non_exhaustive]pub enum Lint {
RawColor,
RawFontSize,
OffGridSpacing,
ButtonWithoutVerb,
IconButtonWithoutLabel,
ManyPrimaryButtons,
StateInBody,
BlockingInBody,
OversizedFile,
AllowWithoutReason,
UnknownLint,
}Expand description
A rule ravenrs-lint checks. Every rule is deny unless the configuration lowers it, and
lowering one to allow needs a reason.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RawColor
A Color value written in the interface (Color::rgb, Color::WHITE, Color { .. }).
It looks right in one theme and wrong in the others. Defining a theme (Theme { .. },
Palette { .. } or a function returning one) is where colors belong, so it is left alone,
and so are the pixels of a picture drawn with ImageData::from_fn.
RawFontSize
.font_size(..): text sizes come from TextStyle steps. A printed report’s Style is
measured in points and left alone.
OffGridSpacing
.padding, .spacing, .gap or Insets with a literal that is not a multiple of 4.
ButtonWithoutVerb
A Button caption that does not start with a verb.
IconButtonWithoutLabel
An IconButton with no .label(..): screen readers would only say the icon’s name.
ManyPrimaryButtons
More than one primary Button in one function. Button is primary unless .style(..)
says otherwise.
StateInBody
State::new inside body or build, which run on every rebuild and start it over.
BlockingInBody
Files, processes, sleeping or blocking network calls inside body or build, which
freeze the window on every rebuild.
OversizedFile
A source file longer than max-file-lines (600 by default).
AllowWithoutReason
A ravenrs-lint: allow(..) comment that does not say why.
UnknownLint
A ravenrs-lint: allow(..) comment naming a rule that does not exist.