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

Adding a rule

What a new rule must ship with before it is merged. The tests refuse one missing any of it.

Description

A rule is a struct implementing Rule under crates/orion-server/src/definitions/clippy/rules/, registered in rules::ALL. It ships with a tests/fixtures/clippy/<id>/fires/ set it must fire on, and a quiet/ set on which no rule may fire. The exclusions are written down. The tests refuse a rule missing either fixture set, and a rule this page does not list. They also refuse any rule that fires on examples/ or the e2e fixtures. Before it ships, it is run over a real estate and every diagnostic is read.

Last verified 14 September 2026