TestkitProperties

scalafix.testkit.TestkitProperties
See theTestkitProperties companion object
final class TestkitProperties(val inputClasspath: Classpath, val inputSourceDirectories: List[AbsolutePath], val outputSourceDirectories: List[AbsolutePath], val sourceroot: AbsolutePath, val scalaVersion: String, val scalacOptions: List[String])

Input arguments to run scalafix testkit rules.

By convention, it's possible to load a TestkitProperties instance from the resource file "scalafix-testkit.properties".

Value parameters

inputClasspath

The class directory of the input sources. This directory should contain a META-INF/semanticd sub-directory with SemanticDB files.

inputSourceDirectories

The source directory of the input sources. This directory should contain Scala code to be fixed by Scalafix.

outputSourceDirectories

The source directories of the expected output sources. These directories should contain Scala source files with the expected output after running Scalafix. When multiple directories are provided, the first directory that contains a source files with a matching relative path in inputSourceroot is used.

scalaVersion

The Scala compiler version used to compile the input sources. This information is passed to rules through the withConfiguration method.

scalacOptions

The Scala compiler options used to compile the input sources. This information is passed to rules through the withConfiguration method.

sourceroot

The SemanticDB sourceroot used to compile the input sources. Defaults to current working directory. Must match the value of -P:semanticdb:sourceroot:>value<, if any.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def resolveInput(path: RelativePath): AbsolutePath
def resolveOutput(path: RelativePath): AbsolutePath

Concrete fields

val inputClasspath: Classpath
val inputSourceDirectories: List[AbsolutePath]
val outputSourceDirectories: List[AbsolutePath]
val sourceroot: AbsolutePath