CQM-LabyrinthRoutine¶
Routine Complexity
Required inputs: RFG
Any routine with a higher cyclomatic complexity (McCabe) than 10 is a violation of this metric.
Motivation
The more branches the control flow of a routine contains, the more difficult it is to understand, test and further develop a routine. Routines with a high control flow complexity are also more error-prone than other routines due to the high number of control flow paths that make them difficult to understand. Likewise, a complete test of the routine becomes more costly and ultimately less likely.
This rule is based on the CQM Quality Indicator: Labyrinthmethode (p. 237-239).
Reference
Simon, Frank/ Seng, Olaf/ Mohaupt, Thomas (2006): Code-Quality-Management: Technische Qualität industrieller Softwaresysteme transparent und vergleichbar gemacht, 1st ed., Heidelberg, Germany: dpunkt.verlag GmbH.
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
This rule shares the following common metric options: base_view_name, excluded_node_types, hierarchy_edge_name, hierarchy_view_name, propagate, report_all_values, report_propagated_values
The following places define options that affect this rule: Analysis-GlobalOptions
alias_name¶
alias_name : str = 'Metric.LabyrinthRoutine'
display_name¶
display_name : str | None = 'Routine Complexity'
max_value¶
max_value : int | None = 10
min_value¶
min_value : int | None = 0
rfg_metric_name¶
rfg_metric_name : str = 'Metric.McCabe_Complexity'