blob: eff4176164fb965fbbaff20255d754f941dd8022 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import cbt._
import scala.meta._
import scalafix.rewrite._
import scalafix.util._
import scalafix.util.TreePatch._
import scalafix.util.TokenPatch._
class Build(val context: Context) extends BaseBuild{
override def compile = {
new BasicBuild(context) with Scalafix{
override def scalafix = super.scalafix.copy(
patches =
Seq(
AddGlobalImport(
importer"scala.collection.immutable"
)
),
rewrites = Seq(
ProcedureSyntax,
ExplicitImplicit,
VolatileLazyVal
)
)
}.scalafix.apply
super.compile // <- as scalafix trigger compile already before re-writing, this will just return the cached compile result before rewriting
}
}
|