Skip to content

Commit a361299

Browse files
committed
Disallow old-style GIT_ATTRIBUTES.
1 parent c40c63b commit a361299

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ public LineEnding getLineEndings() {
6464
}
6565

6666
public void setLineEndings(LineEnding lineEndings) {
67+
if (lineEndings == LineEnding.GIT_ATTRIBUTES) {
68+
throw new IllegalArgumentException("GIT_ATTRIBUTES not supported in Gradle, use GIT_ATTRIBUTES_FAST_ALLSAME instead. See https://github.com/diffplug/spotless/issues/1274 for more details.");
69+
}
6770
this.lineEndings = requireNonNull(lineEndings);
6871
}
6972

0 commit comments

Comments
 (0)