#[non_exhaustive]pub enum LintCode {
Show 20 variants
OrphanPixel,
Jaggy,
DoubleOutline,
StrayAlpha,
NearDuplicateColor,
FlatRamp,
LowContrast,
PillowShading,
Banding,
Mixel,
TooManyColors,
InconsistentSize,
InconsistentOutline,
InconsistentPalette,
InconsistentScale,
UnusedKey,
ScreenBounds,
ScreenOverlap,
OffGrid,
BackgroundClipped,
}Expand description
Stable lint categories. Match on the code rather than the message.
LintCode::as_str gives the name used in lint=allow(...), lint allow and the
command-line tool’s diagnostics, which is stable too.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OrphanPixel
A lone pixel on a flat area, close in lightness to the color around it, which reads as noise; or an opaque pixel that touches nothing at all.
Jaggy
Steps along a silhouette’s edge whose lengths jump, such as 1, 1, 3, 1, 1,
where a clean line keeps one length or changes it gradually.
DoubleOutline
An outline two pixels thick at an L corner, where one diagonal step would do.
StrayAlpha
A lone translucent pixel in an otherwise opaque sprite: a leftover of smoothing.
NearDuplicateColor
Two keys of a palette, both used, whose colors are too close to tell apart.
FlatRamp
A ramp whose hue does not change from end to end: shades that only change in brightness look dull.
LowContrast
Neighbouring keys of a ramp too close in lightness to tell apart.
PillowShading
Shading that darkens toward the edges on every side, with no direction of light.
Banding
A line of a shade one pixel thick between a lighter and a darker one: shading stacked in parallel lines.
Mixel
A sprite drawn at 2×, 3× or 4× among sprites drawn at 1×.
TooManyColors
More colors than a sprite of its size reads well with.
InconsistentSize
A sprite of a set (an animation’s frames, a group) of another size than most.
InconsistentOutline
A sprite of a set with no outline, or another, when most have one; or with one when most have none.
InconsistentPalette
A sprite of a set drawn with a palette that is not a copy of the one most use.
InconsistentScale
A sprite of a set drawn at another pixel scale than most.
UnusedKey
A palette key that nothing uses.
ScreenBounds
An item falls partly outside its screen.
ScreenOverlap
Opaque pixels from multiple screen items overlap. Opt-in.
OffGrid
An item is not aligned to its screen’s declared grid.
BackgroundClipped
A background placement is fully clipped by its native layer or clip rectangle.