rules_scala icon indicating copy to clipboard operation
rules_scala copied to clipboard

Implement scalafix_test rule

Open pauldraper opened this issue 7 years ago • 2 comments

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.)

pauldraper avatar Sep 08 '18 14:09 pauldraper

+1 for this feature

tian000 avatar Aug 26 '19 23:08 tian000

I am not working on this, but things to be done:

  1. 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.

  2. Run Scalafix. For starters, use the command line though eventually a worker implementation would be nice.

  3. 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).

pauldraper avatar Oct 11 '19 08:10 pauldraper