public
Description: Code smell detector for Ruby
Home | Edit | New

Data Clump

In general, a Data Clump occurs when the same two or three items frequently appear together in classes and parameter lists, or when a group of instance variable names start or end with similar substrings.

The recurrence of the items often means there is duplicate code spread around to handle them. There may be an abstraction missing from the code, making the system harder to understand.

Current Support in Reek

The Data Clump detector is new in Reek version 1.1.3.15
Currently Reek looks for a group of two or more parameters with the same names that are expected by three or more methods of a class.

Configuration

Reek’s Data Clump detector currently offers the Basic Smell Options, plus:

Option Value Effect
max_copies integer The maximum number of methods that are permitted to take the same group of parameters. Defaults to 2.
min_clump_size integer The smallest number of parameters that can be reported as a clump. Defaults to 2.
Last edited by kevinrutherford, Thu Sep 03 14:10:42 -0700 2009
Home | Edit | New
Versions: