6.2.5.45. Architecture-VariantDeadCode¶
Report dead code findings considering several client projects (i.e. findings that appear in all projects)
Required inputs: RFG
This rule calculates the views dead_view_name and alive_view_name.
First, dead and alive code for the /Project/rfg is calculated and used to initialize dead_view_name and alive_view_name.
Then, for each RFG in project_rfgs, the alive code is calculated and subtracted from dead_view_name and added to alive_view_name.
RFGs in project_rfgs that cannot be loaded, or do not contain the views base_view_name and entries_view_name, are ignored.
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_messages_in_system_headers, excludes, includes, justification_checker, post_processing, provider, severity
The following places define options that affect this rule: Analysis-GlobalOptions
advanced¶
Options that are normally not required.
advanced.attributes_for_identity : set[str] =
Attribute names that are used to establish identity of nodes across the RFGs.{'Linkage.Name'}Linkage.Nameis always added, even if it is removed by configuration.
advanced.attributes_to_copy : set[str] =
Attribute names to copy from the nodes of the additional RFGs when creating the{'Linkage.Is_Definition', 'Linkage.Name', 'Source.Column', 'Source.File', 'Source.Line', 'Source.Name', 'Source.Path'}Alive in some Variantsview (attributes must exist in all RFGs consistently).Linkage.Nameis always added, even if it is removed by configuration.
alive_view_name¶
alive_view_name : str = 'Alive in some Variants'
base_view_name¶
base_view_name : str = 'Code Facts'
dead_view_name¶
dead_view_name : str = 'Dead in all Variants'
entries_view_name¶
entries_view_name : str = 'Entries'
export_warnings¶
export_warnings : bool = True
loglevel¶
loglevel : LogLevel = 'WARNING'
merge_copies¶
merge_copies : bool = True
project_rfgs¶
project_rfgs : set[bauhaus.analysis.config.LayerRelativePath] = set()
Option Types¶
These types are used by options listed above:
LogLevel¶
An enumeration.WARNING
INFO
DEBUG