-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feed to whole classpath to scalafix and fix ExplicitResultTypes
#172
Changes from all commits
f941cbc
b62056a
2aa70ec
9a72ab9
406717c
482b79c
0f72b94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ import com.goyeau.mill.scalafix.ScalafixModule | |
import mill.scalalib._ | ||
|
||
object project extends ScalaModule with ScalafixModule { | ||
def scalaVersion = "2.13.6" | ||
def scalaVersion = "2.13.10" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Necessary to make test succeed. |
||
def scalacOptions = Seq("-Ywarn-unused") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
object Fix { | ||
def procedure() {} | ||
def myComplexMethod = 1.to(10).map(i => i -> i.toString).toMap | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ trait ScalafixModule extends ScalaModule { | |
T.ctx().log, | ||
repositoriesTask(), | ||
filesToFix(sources()).map(_.path), | ||
Seq(semanticDbData().path), | ||
classpath = (compileClasspath() ++ localClasspath() ++ Seq(semanticDbData())).iterator.toSeq.map(_.path), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A potential further improvement to reduce the added overhead would be to avoid triggering any compilation if none of the rules is semantic ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be tricky, as the task graph can't be changed once it has started. But we have some options at construction time, depending on how lightweight (fast) a check can be. Anyways, this should be done in a separate PR. |
||
scalaVersion(), | ||
scalafixScalaBinaryVersion(), | ||
scalacOptions(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We depend on new API since Mill 0.10.15.