Repository navigation
Type Level Review Marker
One dl:ok marker on an enum TYPE declaration reviews every finding of that
rule for that type -- every unused value, every hard-coded ordinal cast -- in
any unit. Owner rule, 2026-10-28 (lane ENUMRULES, 1.38).
Some enums mirror ordinals stored outside the code: a DB byte column, a wire
protocol, a streamed component property. Such a type can carry FILLER values
whose only job is to push a real value onto its stored ordinal (65 dummies so
LotStatus_InspNotStarted lands at ord('A') = 65), and its code casts
TEnum(B) and Ord(E) on purpose. Reviewing that once, on the type, is the
honest record; one marker per value or per cast is noise.
Put the marker on the line that declares the type -- the line with
<Name> = (:
type
LotStatusCodes = ( // dl:ok unused-enum-value -- REVIEWED 2026-10-28 values mirror stored DB ordinals
LotStatus_Dummy0, LotStatus_Dummy1, ... TCommandID = ( // dl:ok enum-ordinal-cast -- REVIEWED 2026-10-28 ordinals are the wire protocolAccepted forms are the usual ones: dl:ok <rule-id>, dl:ok <rule-id>@<hash>,
dl:ok <rule-id> -- <reason>, dl:ok <rule-id>: <reason>. Two rules can share
one marker (dl:ok unused-enum-value, enum-ordinal-cast -- <reason>).
| Rule | What the type marker silences |
|---|---|
unused-enum-value |
every unnamed value of the type |
enum-ordinal-cast |
every TEnum(<literal>), Ord(e) <cmp> <literal> and case Ord(e) of on the type, in any unit |
Each finding of these rules carries its type's declaration as a SCOPE
(TLintFinding.ScopeFile / ScopeLine); the marker check in lint, lint-all,
lint-project and the editor gutter (LSP) reads that line as well as the
finding's own.
-
Hash. Without
@hashthe marker suppresses andreview-marker-stalesays once (on the type line, not per finding) that it cannot be checked, with the hash to add. With a hash, it is the hash of the TYPE line; re-shaping that line re-reports the findings with areview-marker-stalehint. -
Unused.
lint-allreportsreview-marker-unusedfor a type marker that suppresses nothing (the type has no finding of the rule).lint <file>does not judge a type marker on an enum declaration line: the casts it reviews may live in units that run never looked at.
unused-enum-value already skips a value named for its own ordinal --
Dummy0 at 0, None64 at 64 -- and any type with an implicit use (a cast,
Ord, Low/High, RTTI, a streamed property). The type marker is for what is
left.