Since Checkstyle 5.0
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.
To configure the check:
<module name="Checker"> <module name="FileLength"/> </module>
To configure the check to accept files with up to 1500 lines:
<module name="Checker"> <module name="FileLength"> <property name="max" value="1500"/> </module> </module>
All messages can be customized if the default message doesn't suit you. Please see the documentation to learn how to.
com.puppycrawl.tools.checkstyle.checks.sizes