Skip to main content

Module one_function

Module one_function 

Source
Expand description

The unit one-function-per-file check: a source file holds at most one module-scope function whose body runs longer than the configured threshold.

Re-exports§

pub use crate::violation::Violation;

Functions§

find_violations
A violation for every module-scope function under root past the first whose body runs longer than max_lines, sorted by (file, line). The first over-threshold function in a file holds it; each later one is a violation naming both.