Interface ScalafmtReporter


  • public interface ScalafmtReporter
    A 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.OutputStreamWriter downloadOutputStreamWriter()
      Use this writer for printing progress while downloading new Scalafmt versions.
      java.io.PrintWriter downloadWriter()
      Deprecated.
      void error​(java.nio.file.Path file, java.lang.String message)
      An error occurred while trying to process this file.
      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.
      void error​(java.nio.file.Path file, java.lang.Throwable e)
      An exception occurred while trying to process this file.
      void excluded​(java.nio.file.Path file)
      This file was not formatted because it's excluded by project settings from .scalafmt.conf.
      default void missingVersion​(java.nio.file.Path config, java.lang.String defaultVersion)
      This .scalafmt.conf file is missing the 'version' setting.
      void parsedConfig​(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 type PositionException when 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 message
        e - the exception that occurred, has type PositionException when 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 parsed
        scalafmtVersion - the version of scalafmt used to parse
      • downloadWriter

        @Deprecated
        java.io.PrintWriter downloadWriter()
        Deprecated.
        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