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

Every rule is one principle from one article. fmt fixes the sorting family; check reports all of them. Levels are the defaults; every one can be changed in rabot.toml.

RuleLevelFixPrinciple
sorted-fieldswarnfmtSort everything
sorted-variantswarnfmtSort everything
sorted-impl-itemswarnfmtSort everything
sorted-trait-itemswarnfmtSort everything
sorted-struct-literalwarnfmtSort everything
sorted-struct-patternwarnfmtSort everything
sorted-deriveswarnfmtSort everything
primitive-soupwarnWrap your primitives
primitive-fieldwarnWrap your primitives
stringly-typed-fieldwarnWrap your primitives
bypassable-constructorwarnValidate once, at construction
boolean-validationwarnTreat errors as data
free-functionwarnPut behavior on the type it belongs to
vague-type-namewarnName what you built
orphan-modulewarnName what you built
oversized-implwarnObsess over your data structures
too-many-parameterswarnObsess over your data structures
panic-in-productionwarnTreat errors as data
untyped-errorwarnTreat errors as data
swallowed-errorwarnTreat errors as data
dropped-error-contextwarnTreat errors as data
escape-hatch-variantwarnTreat errors as data
global-statewarnDependencies in the signature
ambient-configwarnDependencies in the signature
mock-usagewarnReal implementations, not mocks
ignored-testwarnWrite down every exception
ambient-timewarnMake the clock injectable
ambient-randomnesswarnMake the clock injectable
sleep-in-testswarnFast and honest tests
commented-out-codewarnDelete the comment, fix the code
vague-todowarnDelete the comment, fix the code
sectioned-functionwarnDelete the comment, fix the code
undocumented-exceptionerrorWrite down every exception
unknown-ruleerrorWrite down every exception
syntax-errorerror

rabot rules prints the same table in the terminal; rabot explain <rule> prints a rule’s page.