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

Having too many lines of code in a file is an indication that it can be split into several files of more manageable size. Generated code is a notable exception to this.

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

  • M. Fowler. Refactoring. Addison-Wesley, 1999.
  • Wikipedia: Code refactoring
  • Refactoring as Meta Programming?