Skip to content

Commit 35dab92

Browse files
committed
Remove lineSeparator LF requirement
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
1 parent 749dd55 commit 35dab92

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringAvoidStaticImportCheck.java

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
/**
2828
* Spring variant of {@link AvoidStarImportCheck}.
29+
*
30+
* @author Phillip Webb
2931
*/
3032
public class SpringAvoidStaticImportCheck extends AvoidStaticImportCheck {
3133

spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
<property name="headerFile" value="${headerFile}" default=""/>
1212
<property name="headerCopyrightPattern" value="${headerCopyrightPattern}"/>
1313
</module>
14-
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck">
15-
<property name="lineSeparator" value="lf"/>
16-
</module>
14+
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck" />
1715

1816
<!-- TreeWalker Checks -->
1917
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">

src/checkstyle/checkstyle.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
<property name="headerFile" value="${checkstyle.header.file}" />
99
<property name="fileExtensions" value="java" />
1010
</module>
11-
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck">
12-
<property name="lineSeparator" value="lf"/>
13-
</module>
11+
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck" />
1412

1513
<!-- TreeWalker Checks -->
1614
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">

0 commit comments

Comments
 (0)