Skip to content

Commit

Permalink
Remove lineSeparator LF requirement
Browse files Browse the repository at this point in the history
Update checkstyle rules so that the `NewlineAtEndOfFile` check no
longer enforces only LF line separators. The default now accepts
LF, CR or CRLF.

Closes gh-202
  • Loading branch information
philwebb committed Aug 24, 2020
1 parent c03c9ea commit 0b36c1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Expand Up @@ -26,6 +26,8 @@

/**
* Spring variant of {@link AvoidStarImportCheck}.
*
* @author Phillip Webb
*/
public class SpringAvoidStaticImportCheck extends AvoidStaticImportCheck {

Expand Down
Expand Up @@ -11,9 +11,7 @@
<property name="headerFile" value="${headerFile}" default=""/>
<property name="headerCopyrightPattern" value="${headerCopyrightPattern}"/>
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck">
<property name="lineSeparator" value="lf"/>
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck" />

<!-- TreeWalker Checks -->
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
Expand Down
4 changes: 1 addition & 3 deletions src/checkstyle/checkstyle.xml
Expand Up @@ -8,9 +8,7 @@
<property name="headerFile" value="${checkstyle.header.file}" />
<property name="fileExtensions" value="java" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck">
<property name="lineSeparator" value="lf"/>
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck" />

<!-- TreeWalker Checks -->
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
Expand Down

0 comments on commit 0b36c1c

Please sign in to comment.