Skip to main content

Module cross_file

Module cross_file 

Source
Expand description

Project-wide analyses that no single file can answer.

The per-file scan contributes a FileSymbols for every file it parses. Those contributions are assembled into a SymbolIndex once the whole walk is done, and each active cross-file rule is evaluated against that index.

Structs§

DeclFilter
Which findings a cross-file rule may report, derived from the rule’s files / ignores globs, skip_test_code and options. Applied to the reported site only: impls are counted wherever they are found.
ErrorMessageLit
A string literal used as an error message, kept for the duplicate-message cross-file analysis.
FileSymbols
What one file contributes to the project index.
SymbolIndex
Project-wide symbol index assembled from every scanned file.
TestHelper
A function or macro_rules! macro a test may delegate its checks to.
TraitDecl
A trait declared in a scanned file.
TraitImpl
An impl Trait for Type header found in a scanned file.
UnassertedTest
A test function that checks nothing on its own.

Enums§

CrossFileKind
Cross-file analyses a rule can request. Builtin only: a custom YAML may tune an existing kind’s severity or message, never invent a new one, so an unknown discriminant is a parse error.

Functions§

evaluate
Evaluate one cross-file rule against the project index.
extract_rust_symbols
Collect the trait declarations and trait impls of one parsed Rust file.