What are the steps of parsing a Scala source file into a SemanticDocument using ScalaFix?
Asked
Active
Viewed 82 times
0
Dmytro Mitin
- 48,194
- 3
- 28
- 66
Gakuo
- 845
- 6
- 26
1 Answers
0
As of scalafix(0.9.4),
To write a SemanticRule , one has to extend the abstract class SemanticRule and this abstract class has a method fix with the following signature:
def fix(implicit doc: SemanticDocument): Patch
If we override this method to create a Patch either for fixing or linting, we will have access to implicit value doc. Scalafix populates this variable by parsing a single source file. doc represents a single source file.
Uttej Guduru
- 40
- 8