public interface ScalafmtSession
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(java.nio.file.Path file,
java.lang.String code)
Format a single file with the given configuration.
|
ScalafmtResult |
formatOrError(java.nio.file.Path file,
java.lang.String code)
Format a single file with the given configuration.
|
boolean |
isGitOnly()
Whether this configuration intends to limit files to those managed by git.
|
boolean |
matchesProjectFilters(java.nio.file.Path file)
Whether the path matches the 'project.{excludeFilters,includeFilters}' setting.
|
java.lang.String format(java.nio.file.Path file,
java.lang.String code)
file - relative or absolute path to the file being formatted. Used only for the path
name, the file does not have to exist on disk.code - the text contents to format.ScalafmtResult formatOrError(java.nio.file.Path file, java.lang.String code)
file - relative or absolute path to the file being formatted. Used only for the path
name, the file does not have to exist on disk.code - the text contents to format.boolean matchesProjectFilters(java.nio.file.Path file)
file - path to matchboolean isGitOnly()