Metric-OO.LCOMs

Lack of cohesion in non-static methods

Required inputs: RFG

Count of function member pairs of a class that have no similarity regarding the common use of data members. Do not count static data members.

Possible Messages

This rule has no predefined messages.

Options

display_name

display_name : str | None = 'Lack of cohesion in non-static methods'

Description of the metric shown in the dashboard. If None, rfg_metric_name is used.
 

ignore_artificial_methods

ignore_artificial_methods : bool = True

Do not count artificial methods.
 

ignore_deleted_methods

ignore_deleted_methods : bool = True

Do not count deleted methods.
 

ignore_interface_classes

ignore_interface_classes : bool = False

Do not calculate metric for classes marked as interfaces. Classes without data members and only pure virtual methods, except static methods and constructors, are considered interfaces.
 

max_value

max_value : int | None = 5

Maximum allowed value. None if unlimited.
 

min_value

min_value : int | None = 0

Minimum allowed value. None if unlimited.
 

rfg_metric_name

rfg_metric_name : str = 'Metric.OO.LCOMs'

Name of the node attribute storing the metric value in the RFG.