Miscellaneous-BusyHeaders

Identify files with large product of includes and includers

Required inputs: IR

This rule identifies header files where the product of the number of transitively included headers and the number of translation units including the header exceeds a configurable threshold.
Rationale

Busy header files can cause long compilation times. Eliminate dependencies between headers to reduce the amount of code included in each translation unit.

Possible Messages

Key

Text

Severity

Disabled

busy_header

File is too busy (large product of includes and includers)

None

False

Options

detailed_entity

detailed_entity : bool = False

Output number of includes, includers and their product as well.
 

stop_on_files

stop_on_files : set[str] = set()

Stop recursion into includes for this set of file names.
 

threshold

threshold : int = 1000

Maximum allowed product of includes/includers.