Sha256: 870337faff4c5f2596e287da12dc28a0e390b5bb01375badf52cff126f93379d
Contents?: true
Size: 726 Bytes
Versions: 47
Compression:
Stored size: 726 Bytes
Contents
## Introduction _Too Many Constants_ is a case of [Large Class](Large-Class.md). ## Example Given this configuration ```yaml TooManyConstants: max_constants: 3 ``` and this code: ```Ruby class Smelly CONST_1 = :dummy CONST_2 = :dummy CONST_3 = :dummy CONST_4 = :dummy end ``` Reek would emit the following warning: ``` test.rb -- 1 warning: [1]:TooManyConstants: Smelly has 4 constants ``` ## Configuration Reek's _Too Many Constants_ detector offers the [Basic Smell Options](Basic-Smell-Options.md), plus: | Option | Value | Effect | | -------------------------|---------|---------| | `max_constants` | integer | The maximum number of constants that are permitted. Defaults to 5 |
Version data entries
47 entries across 45 versions & 2 rubygems