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

View Source

Detects functions with nesting depth exceeding a threshold. Deeply nested code (conditionals inside loops inside conditionals, etc.) is harder to understand and should be refactored into smaller functions.

Category: Readability / Priority: normal

Configuration

Accepts the following parameters via .metacredo.exs:

  • max_nesting - Maximum allowed nesting depth (default: 4) (default: 4)