ScalaClean is a set of rules for ScalaFix that do deeper code of a codebase based on ScalaFix and SemanticDB.
In development - not yet working.
- Dead code detection removal
- adjust method/class/package visability to minimum
- find and remove unused parameters (e.g. overriding method but parameter is not used anywhere)
- Many more
- Create extension methods in ScalaFix to support pre-analysis
- Generate graph structure (packages/classes/methods/references)
- Work out how to write automated tests (maybe debug text in result?
- Apply detected code rules
We rely on a tweaked version of ScalaFix at the moment, so you need to clone it and publish it locally:
-
Fork and clone: https://github.com/rorygraves/scalafix
- This will create a package scalafix
-
(Within scalafix) Checkout branch
rule_begin_end
-
(Within scalafix) )Run
sbt publishLocal
- If this fails check that JAVA_HOME is set to be a JDK root -
Make a note of the version number published e.g.
0.9.1+5-6bbf4f13-SNAPSHOT
-
In workspace fork and clone ```https://github.com/rorygraves/ScalaClean`````
-
(in ScalaClean) - ensure version in project/plugins.sbt matches version above
-
Open ScalaClean in Intellij)
-
Run RuleSuite