CQM-ForbiddenLoveFile

ForbiddenLoveFile

Required inputs: IR

This metric counts the number of cycles at file level.

Motivation

A clever »divide et impera« strategy creates modular units, each of which can be understood, tested and maintained separately. Dependencies on other parts, which inevitably arise when building an overall system, are usually expressed in the form of layers, i.e., there are pure service providers (e.g., I/O functionality) that are used by the next higher layer, which offers functionality of an even higher level. This modularity should be found in particular at the file level, in order to avoid the situation where the content of two files can only be understood together. Otherwise, the contents of one file require those of the other and vice versa.

Note: The original definition of this rule focuses on direct cyclic dependencies between file pairs, our implementation however also considers indirect dependencies and cycles consisting of more than 2 files.

This rule is based on the CQM Quality Indicator: verbotene Dateiliebe (p. 312-314).

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

display_name

display_name : str | None = 'The number of cycles at file level'

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

max_value

max_value : int | None = 6

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.ForbiddenLove.File'

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