This metric measures the number of lines of code in a function. This excludes comments and blank lines.

Having too many lines of code in a function is an indication that it can be split into several functions of more manageable size.

Long functions should be examined to see if they can be split into smaller, more cohesive functions.

  • M. Fowler, Refactoring. Addison-Wesley, 1999.
  • Wikipedia: Code refactoring.