How to get rid of Checkstyle message ‘File does not end with a newline.’

Put a newline at the end of the file
configure CheckStyle not to care.

<module name="Checker">
    <!-- stuff deleted -->
    <module name="NewlineAtEndOfFile">
        <property name="severity" value="ignore" />

You also have to tell the Maven Checkstyle plugin to use your checkstyle config file.


Leave a Comment