Module ratchet
Expand description
Source suppression ceilings. They only go down as suppressions are removed.
Structsยง
- Counter ๐
- Counts every
#[expect]in a file: on items, and equally on statements, expressions, fields, variants and parameters, whichsynโs visitor reaches throughVisit::visit_attribute. An expectation inside a macro invocationโs tokens is not parsed and so not counted. - Counts ๐
Constantsยง
- EXPECT_
CEILING ๐ - Maximum number of
#[expect(...)]attributes. - PRODUCTION_
TOO_ ๐MANY_ LINES_ CEILING - Maximum production
too_many_linesexpectations. - TOO_
MANY_ ๐LINES_ CEILING - Maximum number of
too_many_linesexpectations.
Functionsยง
- cfg_
test ๐ - check_
sources ๐ - check_
tree ๐ - count_
file ๐ - count_
sources ๐ - Counts each fileโs expectations, classifying a file as test code by
test_files. - is_
too_ ๐many_ lines - Whether
pathis exactlyclippy::too_many_lines. - module_
files ๐ - Collects the candidate files of each out-of-line
modinitems, with whether the declaration is under#[cfg(test)].inlinenames the inline modules enclosingitems. Paths follow the referenceโs module-path rules: a#[path]outside inline modules is relative to the fileโs directory, and otherwise a module lives under the directory of amod.rs-style file (lib.rs,main.rs,mod.rs,build.rs, or a crate root underbin,tests,benchesorexamples), or under one named after any other file. - normalize ๐
- Resolves
.and..components lexically. - test_
files ๐ - The files counted as test code: test paths (see
test_path: test, bench and example targets,tests.rsand*_tests.rs),#![cfg(test)]files, and every file that an out-of-linemoddeclared in test code loads, transitively. A declaration is test code when it or an enclosing inline module is#[cfg(test)], or when its file is test code. - test_
path ๐ - walk ๐
Type Aliasesยง
- Ceiling ๐
- A ceilingโs constant name, the count it bounds, and its value.