Class DiffMessageFormatter
java.lang.Object
com.diffplug.spotless.extra.integration.DiffMessageFormatter
Formats the messages of failed spotlessCheck invocations with a nice diff message.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DiffMessageFormatter.Builderbuilder()Returns a map entry with value being a git-style diff between the contents of the given file and what those contents would look like if formatted using the given formatter.
-
Field Details
-
MAX_FILES_TO_LIST
public static final int MAX_FILES_TO_LIST- See Also:
-
-
Method Details
-
builder
-
diff
public static Map.Entry<Integer,String> diff(Path rootDir, Formatter formatter, File file) throws IOException Returns a map entry with value being a git-style diff between the contents of the given file and what those contents would look like if formatted using the given formatter. Does not end with any newline sequence (\n, \r, \r\n). The key of the map entry is the 0-based line where the first difference occurred.- Throws:
IOException
-