File tree 2 files changed +6
-4
lines changed
scalafix-rules/src/main/scala/scalafix/internal/rule
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ lazy val rules = project
74
74
buildInfoKeys ++= Seq [BuildInfoKey ](
75
75
" supportedScalaVersions" -> (scalaVersion.value +:
76
76
testedPreviousScalaVersions
77
- .getOrElse(scalaVersion.value, Nil ))
77
+ .getOrElse(scalaVersion.value, Nil )),
78
+ " allSupportedScalaVersions" -> ((crossScalaVersions.value ++ testedPreviousScalaVersions.values.toSeq.flatten).sorted)
78
79
),
79
80
buildInfoObject := " RulesBuildInfo" ,
80
81
description := " Built-in Scalafix rules" ,
Original file line number Diff line number Diff line change @@ -18,14 +18,15 @@ final class ExplicitResultTypes(
18
18
) extends SemanticRule (" ExplicitResultTypes" ) {
19
19
20
20
def this () = this (ExplicitResultTypesConfig .default, LazyValue .now(None ))
21
- val supportedScalaVersions = RulesBuildInfo .supportedScalaVersions
22
- val compilerScalaVersion = RulesBuildInfo .scalaVersion
21
+ val supportedScalaVersions : collection.Seq [String ] =
22
+ RulesBuildInfo .supportedScalaVersions
23
+ val compilerScalaVersion : String = RulesBuildInfo .scalaVersion
23
24
24
25
private def toBinaryVersion (v : String ) = v.split('.' ).take(2 ).mkString(" ." )
25
26
26
27
override def description : String =
27
28
" Inserts type annotations for inferred public members. " +
28
- s " Only compatible with Scala ${supportedScalaVersions. mkString(" ," )}. "
29
+ s " Only compatible with Scala ${RulesBuildInfo .allSupportedScalaVersions. mkString(" , " )}. "
29
30
override def isRewrite : Boolean = true
30
31
31
32
override def afterComplete (): Unit = {
You can’t perform that action at this time.
0 commit comments