Cognitive Complexity threshold exceeded (LC0090)

This rule triggers when a procedure’s Cognitive Complexity exceeds a configurable threshold. High cognitive complexity indicates code that is difficult to understand and reason about.

Consider refactoring complex procedures by:

  • Extracting nested logic into well-named helper methods
  • Using early returns to reduce nesting
  • Simplifying conditional logic
  • Breaking down complex procedures into smaller, focused units

See also

  • LC0089 - Cognitive Complexity metric
  • LC0010 - Cyclomatic Complexity threshold exceeded