Skip to content

Checker NewlineAtEndOfFile configuration causes build to fail on Windows #4

@kjrdn

Description

@kjrdn

The current configuration in slamd-checkstyle.xml causes the build to fail in Windows due to Unix style line endings:

checkstyle:
[echo] Checking source code style characteristics....
[checkstyle] Running Checkstyle 8.18 on 384 files
[checkstyle] [ERROR] C:\......\AccessDeniedException.java:1: File does not end with a newline. [NewlineAtEndOfFile]
...
BUILD FAILED
C:\......\build.xml:439: Got 384 errors and 0 warnings.

Changed the configuration to the following and it builds without errors:

<module name="NewlineAtEndOfFile">
        <property name="lineSeparator" value="lf" />
</module>

https://stackoverflow.com/questions/997021/how-to-get-rid-of-checkstyle-message-file-does-not-end-with-a-newline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions