scalafix.testkit
Members list
Type members
Classlikes
Construct a test suite for running semantic Scalafix rules.
Construct a test suite for running semantic Scalafix rules.
Mix-in AnyFunSuiteLike or the testing style of your choice if you add your own tests.
Attributes
- Supertypes
-
trait BeforeAndAfterAlltrait SuiteMixintrait DiffAssertionstrait TestRegistrationtrait Suitetrait Serializabletrait Assertionstrait TripleEqualstrait TripleEqualsSupportclass Objecttrait Matchableclass AnyShow all
- Self type
Utility to unit test syntactic rules.
Utility to unit test syntactic rules.
Mix-in AnyFunSuiteLike or the testing style of your choice if you add your own tests.
Value parameters
- rule
-
the default rule to use from
check/checkDiff.
Attributes
- Supertypes
-
trait DiffAssertionstrait TestRegistrationtrait Suitetrait Serializabletrait Assertionstrait TripleEqualstrait TripleEqualsSupportclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DiffAssertions.type
Attributes
- Companion
- object
- Supertypes
-
trait Suitetrait Serializabletrait Assertionstrait TripleEqualstrait TripleEqualsSupportclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SemanticRuleSuite.type
An input file for a testkit test.
An input file for a testkit test.
Value parameters
- input
-
the absolute path to the input file.
- semanticdbPath
-
the input file relativized by the SemanticDB sourceroot. Used to compute the path to the SemanticDB payload.
- testPath
-
the input file relativized by input source directory (but including its last subpath). Used to compute the test name and the expected output file.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TestkitPath.type
Input arguments to run scalafix testkit rules.
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
withConfigurationmethod. - scalacOptions
-
The Scala compiler options used to compile the input sources. This information is passed to rules through the
withConfigurationmethod. - 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
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TestkitProperties.type