ALL-MODU0006 · module_statement_count
Limit the total statement inventory one source module owns.
This is a deterministic rule for all languages. Read its implementation.
Definition
Section titled “Definition”Count statements throughout the module, including statements nested inside classes, functions, and control-flow blocks. Declarations count because they also ask a reader to understand one source-level decision. Comments and blank lines do not count.
Evidence
Section titled “Evidence”The finding names the module and its exact recursive statement count. The value is the number of statements owned by that file.
Exceptions
Section titled “Exceptions”Generated parsers, schemas, and migration snapshots can be excluded by path. Hand-written modules should split at a coherent responsibility boundary instead of raising the ceiling.
Examples
Section titled “Examples”A file with 150 statements across ten functions returns 150. A file with 201 returns 201
and fails the standard ceiling even when no individual function is long.
References
Section titled “References”- Generalizes Ruff PLR0915 too-many-statements. Open reference
- Cites “Clean Code”, chapter 10, Classes