6.2.5.40. Architecture-CycleDetection¶
Find cycles in the RFG and report them as violations
Required inputs: RFG
This rule identifies cycles in the selected program view.
A cycle in the call graph, for example, bears the risk of infinite recursion at runtime if the termination of the calls is not guaranteed. As a consequence, the entire cycle has to be understood and all conditions must be managed simultaneously as to not induce runtime failure. At the same time, cycles impede understandability of the code for a developer.
If you want to include dynamic calls for function pointers and virtual calls, then manually activate StaticSemanticAnalysis.
This rule does not modify the RFG
(use Architecture-CyclesView to generate
a Cycles view).
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, includes, justification_checker, post_processing
The following places define options that affect this rule: Analysis-GlobalOptions
base_view_name¶
base_view_name : str = 'Call'
generate_violation_previews¶
generate_violation_previews : bool = True
ignored_edge_types¶
ignored_edge_types : set[str] = set()
pre_excludes¶
pre_excludes : set[bauhaus.analysis.config.GlobPattern] = set()
preview_edge_limit¶
preview_edge_limit : int = 1000
preview_node_limit¶
preview_node_limit : int = 1000
selfloops¶
selfloops : bool = False