Implement scalafix_test rule
https://scalacenter.github.io/scalafix/
Can perform refactorings like remove unused imports.
I'm thinking similar to scalafmt_test. (And there should be a way to chain these.)
+1 for this feature
I am not working on this, but things to be done:
-
Compile Scala sources with SemanticDB compiler plugin. This could be done as part of the normal compile (with a custom scala_compile), or separately. In theory, SemanticDB can be used for several analysis tools, so perhaps part of the normal compile. See also #142.
-
Run Scalafix. For starters, use the command line though eventually a worker implementation would be nice.
-
Compose this with the test_scala_format rule. (First run scalafix, then run scalafmt.) Perhaps this is another use for phases/custom rule composition (test_scala_lint).