Metric-HIS.VOCF¶
HIS VOCF metric: Language scope (vocabulary frequency)
Required inputs: RFG
VOCF = (N1 + N2) / (n1 + n2), where
- n1 = Number of different operators
- N1 = Sum of all Operators
- n2 = Number of different Operands
- N2 = Sum of all Operands
For more information on what is considered an operator please refer to the documentation (Project Configuration / Language Schema / Language Representation for C / Metrics / Halstead metrics).
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.HIS.VOCF'
display_name¶
display_name : str | None = 'HIS VOCF'
max_value¶
max_value : float | None = 4.0
min_value¶
min_value : float | None = 1.0
rfg_metric_name¶
rfg_metric_name
Name of the node attribute storing the metric value in the RFG. The name of the RFG node attribute of the original metric.Type: OriginalMetrics
Default:
'Metric.Halstead.Vocabulary_Frequency'
Option Types¶
These types are used by options listed above:
OriginalMetrics¶
An enumeration.Metric.Halstead.Vocabulary_Frequency