6.2.11.9. HalsteadMetrics¶
Halstead complexity metrics
Nested Rules
Different Halstead Operands |
|
Different Halstead Operators |
|
Halstead Difficulty |
|
Halstead Effort |
|
Halstead Length |
|
Total Halstead Operands |
|
Total Halstead Operators |
|
Halstead Vocabulary |
|
Halstead Vocabulary Frequency |
|
Halstead Volume |
Options¶
Setting an option for this rule means setting the default for all nested rules.
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
operator_blacklist¶
operator_blacklist : set[str] = set()
If, for example, the tokens
) and } are added, the number of different operators in the function sum() seen here is reduced from 9 to 7.
int sum(int a, int b)
{
return a + b;
}
For more information on what is considered an operator please refer to the documentation (Analysis Guide / Metrics / Halstead metrics).