Who thinks it would be great if the Drupal Coding Standards included checks for Cyclomatic Complexity?
This is a metric used to check the complexity of a function by checking the number of paths through it. There are those that think this should be limited at 10, any more and the function is too complex and should be refactored into a number of smaller, more easy to read, functions.
A good place this has highlighted faults is with people's use of the hook_form_alter() which ends up with a switching if of doom when they should really be using hook_form_FORM_ID_alter in most cases to just work on the form they actually want to change.
The PHPCS Generic CoderSniffer rules include the logic for this check already. I've pulled their code into the Drupal Coding Standards and will supply a patch for review below.
For more details on this metric, see: http://en.wikipedia.org/wiki/Cyclomatic_complexity