Skip to content

Commit

Permalink
Ensure Spotless works on Microsoft Windows
Browse files Browse the repository at this point in the history
This commit is an attempt to ensure that Spotless in the JUnit 5 build
works properly when run on Microsoft Windows. Specifically, line endings
for text files checked out via Git are now forced to LF instead of
allowing automatic conversion to CFLF on Windows. In addition, Spotless
has been configured to use 'UNIX' line endings (i.e., LF).

Issue: #398
  • Loading branch information
sbrannen committed Jul 15, 2016
1 parent bd7128a commit dc5e875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ allprojects {
eclipseFormatFile rootProject.file('src/eclipse/junit-eclipse-formatter-settings.xml')

trimTrailingWhitespace()
lineEndings 'UNIX'
endWithNewline()

custom 'Lambda fix', { it.replace('} )', '})').replace('} ,', '},') }
Expand Down Expand Up @@ -395,11 +396,13 @@ configure(rootProject) {
target '**/*.gradle', '**/*.gitignore'
indentWithTabs()
trimTrailingWhitespace()
lineEndings 'UNIX'
endWithNewline()
}
format 'documentation', {
target '**/*.adoc', '**/*.md'
trimTrailingWhitespace()
lineEndings 'UNIX'
endWithNewline()
}
}
Expand Down

0 comments on commit dc5e875

Please sign in to comment.