Skip to main content

Module ratchet

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, which synโ€™s visitor reaches through Visit::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_lines expectations.
TOO_MANY_LINES_CEILING ๐Ÿ”’
Maximum number of too_many_lines expectations.

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 path is exactly clippy::too_many_lines.
module_files ๐Ÿ”’
Collects the candidate files of each out-of-line mod in items, with whether the declaration is under #[cfg(test)]. inline names the inline modules enclosing items. 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 a mod.rs-style file (lib.rs, main.rs, mod.rs, build.rs, or a crate root under bin, tests, benches or examples), 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.rs and *_tests.rs), #![cfg(test)] files, and every file that an out-of-line mod declared 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.