Skip to content

new Check: LineEnding #18109

@romani

Description

@romani

split from #893

example of Check that doing similar is https://checkstyle.sourceforge.io/checks/misc/newlineatendoffile.html#NewlineAtEndOfFile
attention to
https://checkstyle.sourceforge.io/property_types.html#LineSeparatorOption

Check can be named: LineEnding

<module name="Checker">
  <module name="LineEnding">
    <property name="lineSeparator" value="lf"/>
    <property name="fileExtensions" value="java, xml, cpp"/>
  </module>
</module>

and for windows:

<module name="Checker">
  <module name="LineEnding">
    <property name="lineSeparator" value="crlf"/>
    <property name="fileExtensions" value="bat, cmd"/>
  </module>
</module>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions