Class FileLengthCheck

All Implemented Interfaces:
Configurable, Contextualizable, FileSetCheck

Checks for long source files.

Rationale: If a source file becomes very long it is hard to understand. Therefore, long classes should usually be refactored into several individual classes that focus on a specific task.

Since:
3.2
  • Field Details

  • Constructor Details

  • Method Details

    • processFiltered

      protected void processFiltered(File file, FileText fileText)
      Description copied from class: AbstractFileSetCheck
      Called to process a file that matches the specified file extensions.
      Specified by:
      processFiltered in class AbstractFileSetCheck
      Parameters:
      file - the file to be processed
      fileText - the contents of the file.
    • setMax

      public void setMax(int length)
      Setter to specify the maximum number of lines allowed.
      Parameters:
      length - the maximum length of a Java source file
      Since:
      3.2