Package org.scalafmt.interfaces
Interface ScalafmtReporter
-
public interface ScalafmtReporterA reporter to handle error and information messages from Scalafmt.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description java.io.OutputStreamWriterdownloadOutputStreamWriter()Use this writer for printing progress while downloading new Scalafmt versions.java.io.PrintWriterdownloadWriter()Deprecated.voiderror(java.nio.file.Path file, java.lang.String message)An error occurred while trying to process this file.default voiderror(java.nio.file.Path file, java.lang.String message, java.lang.Throwable e)An exception occurred while trying to process this file.voiderror(java.nio.file.Path file, java.lang.Throwable e)An exception occurred while trying to process this file.voidexcluded(java.nio.file.Path file)This file was not formatted because it's excluded by project settings from .scalafmt.conf.default voidmissingVersion(java.nio.file.Path config, java.lang.String defaultVersion)This .scalafmt.conf file is missing the 'version' setting.voidparsedConfig(java.nio.file.Path config, java.lang.String scalafmtVersion)Record the configuration file and version used
-
-
-
Method Detail
-
error
void error(java.nio.file.Path file, java.lang.String message)An error occurred while trying to process this file.- Parameters:
file- can be either a Scala source file or .scalafmt.conf.message- the error message.
-
error
void error(java.nio.file.Path file, java.lang.Throwable e)An exception occurred while trying to process this file.- Parameters:
file- can be either a Scala source file or .scalafmt.conf.e- the exception that occurred, has typePositionExceptionwhen the error appeared as a position.
-
error
default void error(java.nio.file.Path file, java.lang.String message, java.lang.Throwable e)An exception occurred while trying to process this file.- Parameters:
file- can be either a Scala source file or .scalafmt.conf.message- additional error messagee- the exception that occurred, has typePositionExceptionwhen the error appeared as a position.
-
excluded
void excluded(java.nio.file.Path file)
This file was not formatted because it's excluded by project settings from .scalafmt.conf.- Parameters:
file- the file path that was not formatted.
-
missingVersion
default void missingVersion(java.nio.file.Path config, java.lang.String defaultVersion)This .scalafmt.conf file is missing the 'version' setting.- Parameters:
config- the .scalafmt.conf file.defaultVersion- the configured default Scalafmt version.
-
parsedConfig
void parsedConfig(java.nio.file.Path config, java.lang.String scalafmtVersion)Record the configuration file and version used- Parameters:
config- location of the configuration file parsedscalafmtVersion- the version of scalafmt used to parse
-
downloadWriter
@Deprecated java.io.PrintWriter downloadWriter()
Deprecated.UsedownloadOutputStreamWriter()instead.- Returns:
- an instance of progress writer
-
downloadOutputStreamWriter
java.io.OutputStreamWriter downloadOutputStreamWriter()
Use this writer for printing progress while downloading new Scalafmt versions.- Returns:
- an instance of progress writer
-
-