notes

Function length

Name: ratified 2026-10-18 (calef, convention-rulings Rule 3).

(Appendix of the register. Stem minted by milestone 888 (a ratchet on function length) on 2026-10-11 (UTC).)

No function in scope is over 100 code lines, and script/lint keeps it that way. The gate is the lint ratchet, helpers/lint_ratchet.py, for §283 (a function is held to 100 code lines by a lint ratchet). Its baseline, design/lint-baseline.tsv, holds no function-length rows, so a function over 100 code lines fails outright. The measure has no chart: at zero, the gate is the whole record (calef, 2026-10-14 UTC).

The measure is clippy's

A function's length is the count clippy's too_many_lines reports: the lines of its body, braces excluded, that carry code once comments and blank lines are skipped. helpers/function_length.py reproduces it from source text, so the gate can judge code no clippy pass compiles. Measured at a threshold of 0 on 2026-10-13 (UTC) over the lint ratchet's eight clippy passes, the two agreed on 11,209 of the 11,217 functions clippy reported; the 8 others are under BUGS. The lint ratchet compares them on every function clippy reports over 100, and fails on any difference. A closure is not a function here: its lines belong to the function around it.

The scope

Every tracked .rs file outside vendor/, test code and #[cfg(test)] items included (§283, calef, 2026-10-13 UTC). helpers/function_length.py's in_scope is the one scope function, and the gate reads it. The text measure also reaches code no clippy pass compiles, such as the kernel's build-mode features, the UEFI loader and the exercisers.

BUGS