MetaCredo.Check.Readability.MagicNumber (MetaCredo v0.1.0)

View Source

Detects numeric literals used directly in expressions without being assigned to a named constant. Magic numbers make code harder to understand and maintain.

Category: Readability / Priority: low

Configuration

Accepts the following parameters via .metacredo.exs:

  • ignored_numbers - Numbers to skip (default: [0, 1, -1]) (default: [0, 1, {:-, [line: 5, column: 46], [1]}])