Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Implement scalafix_test rule #98

Open
pauldraper opened this issue Sep 8, 2018 · 2 comments
Open

Implement scalafix_test rule #98

pauldraper opened this issue Sep 8, 2018 · 2 comments

Comments

@pauldraper
Copy link
Contributor

pauldraper commented Sep 8, 2018

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 pauldraper changed the title Implement scalafix rule Implement scalafix_test rule Sep 8, 2018
@tian000
Copy link

tian000 commented Aug 26, 2019

+1 for this feature

@pauldraper
Copy link
Contributor Author

pauldraper commented Oct 11, 2019

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 [WIP] Add a Semanticdb plugin #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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants