Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rules

Each lint rule walks the parsed AST looking for a specific pattern. When a rule fires it produces a Diagnostic — the source range, a message, and (when applicable) a machine-applicable Fix that replaces a byte range with new text.

Fixes are byte-level text replacements, not AST rewrites. That means a fix only touches the affected source range and leaves the surrounding formatting alone. Once --fix has been applied the user is expected to run rafiki fmt if they want whitespace normalised.

Categories

RuleAuto-fixNotes
bool-comparisonRewrites x == true as x, x == false as !x
collapsible-else-ifRewrites else { if … } as else if …
collapsible-ifMerges a nested if with &&; skipped when comments intervene
compound-assignmentRewrites x = x + n as x += n
ifs-same-condChecks for consecutive ifs with the same condition
import-order⚠️Suppressed when comments interleave
naming-conventionNaming convention according to Coding Conventions
one-class-per-fileOnly allow one class per file according to Coding Conventions
redundant-resource-refDrops legacy @ on Rez.* refs
super-initializer-callFlags missing Base.initialize(…) Coding Conventions
unneeded-parensRemoves redundant parentheses