MCPcopy
hub / github.com/diffplug/spotless / Policy

Interface Policy

src/main/java/com/diffplug/gradle/spotless/LineEnding.java:79–88  ·  view source on GitHub ↗

A policy for line endings which can vary based on the specific file being requested.

Source from the content-addressed store, hash-verified

77
78 /** A policy for line endings which can vary based on the specific file being requested. */
79 public interface Policy {
80 /** Returns the line ending appropriate for the given file. */
81 String getEndingFor(File file);
82
83 /** Returns true iff this file has unix line endings. */
84 default boolean isUnix(File file) {
85 String ending = getEndingFor(file);
86 return ending.equals(UNIX.str());
87 }
88 }
89
90 /** Returns a string with exclusively unix line endings. */
91 public static String toUnix(String input) {

Callers 2

applyLineEndingsMethod · 0.65
isCleanMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected