CQM-IncompleteCode

Code contains comments that point to it being incomplete

Required inputs: RFG

Counts the number of occurrences of the token specified in tokens.

Motivation

In day-to-day business, it can always become necessary to implement workarounds in the system at short notice for various reasons. These workarounds, which clearly represent suboptimal solutions, should be commented on accordingly by a developer in any case. An excellent option is, for example, the use of formal documentation techniques such as Javadoc or Doxygen. A corresponding tag should be established there (e.g. @todo).

In the productive code, on the other hand, such workarounds should no longer exist, since the patches that became necessary in the short term were then obviously transferred to the productive code that was intended for the long term.

This rule is based on the CQM Quality Indicator: unfertiger Code (p. 303-305).

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 = 'Code contains comments that point to it being incomplete'

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

max_value

max_value : int | None = 230

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.IncompleteCode'

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

tokens

tokens : set[str] = {'Fixme', 'Hack', 'Todo'}

The marker tokens that indicate incomplete code.