Package com.diffplug.spotless.extra
Class GitAttributesLineEndings
- java.lang.Object
-
- com.diffplug.spotless.extra.GitAttributesLineEndings
-
public final class GitAttributesLineEndings extends java.lang.ObjectUses .gitattributes to determine the appropriate line ending. Falls back to thecore.eolandcore.autocrlfproperties in the git config if there are no applicable git attributes, then finally falls back to the platform native.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LineEnding.Policycreate(java.io.File projectDir, java.util.function.Supplier<java.lang.Iterable<java.io.File>> toFormat)Creates a line-endings policy whose serialized state is relativized against projectDir, at the cost of eagerly evaluating the line-ending state of every target file when the policy is checked for equality with another policy.static LineEnding.PolicycreateFastAllSame(java.io.File projectDir, java.util.function.Supplier<java.lang.Iterable<java.io.File>> toFormat)Creates a line-endings policy which matchescreate(File, Supplier), which is much faster at the cost that every file under the policy is assumed to have the same line endings as the first file.
-
-
-
Method Detail
-
createFastAllSame
public static LineEnding.Policy createFastAllSame(java.io.File projectDir, java.util.function.Supplier<java.lang.Iterable<java.io.File>> toFormat)
Creates a line-endings policy which matchescreate(File, Supplier), which is much faster at the cost that every file under the policy is assumed to have the same line endings as the first file.
-
create
public static LineEnding.Policy create(java.io.File projectDir, java.util.function.Supplier<java.lang.Iterable<java.io.File>> toFormat)
Creates a line-endings policy whose serialized state is relativized against projectDir, at the cost of eagerly evaluating the line-ending state of every target file when the policy is checked for equality with another policy.
-
-