Back

LL089

High cyclomatic complexity

Object Pascal — Delphi & Free Pascal
Warning
Complexity

Methods exceeding 10 decision points are hard to test and maintain reliably

methods exceeding 10 decision points are hard to test and maintain reliably.

Why this severity

methods exceeding 10 decision points are hard to test and maintain reliably.


Known false positives

generated state machines or parsers with many valid branches.

Remediation example

procedure HandleStatus(S: TStatus);
begin
  StatusHandlers[S].Execute;
end;

Reconnecting… Connection lost. Reload