Convert scalafmt integration to use a compile-only sourceset#1283
Convert scalafmt integration to use a compile-only sourceset#1283nedtwigg merged 12 commits intodiffplug:mainfrom
Conversation
fcb77ca to
848061e
Compare
testlib/src/test/java/com/diffplug/spotless/scala/ScalaFmtStepTest.java
Outdated
Show resolved
Hide resolved
| public String apply(String input) throws Exception { | ||
| ScalafmtConfig config; | ||
| if (configSignature.files().isEmpty()) { | ||
| // Note that reflection is used here only because Scalafmt has a method called |
There was a problem hiding this comment.
One way around this may be that instead of defining ScalafmtFormatterFunc as a Java source file, instead we can define it as a Scala source file (which with a basic class Java has no issues calling). Not sure if this is possible or even desirable
There was a problem hiding this comment.
I'd be okay putting Scala into our codebase if it was really useful for some task, but this is small enough that I'd prefer the reflection. Note the little refactor I did in a75877c.
ea185c5 to
d0e5667
Compare
d0e5667 to
966f33d
Compare
966f33d to
781eb68
Compare
lib/src/scalafmt/java/com/diffplug/spotless/glue/scalafmt/ScalafmtFormatterFunc.java
Show resolved
Hide resolved
lib/src/main/java/com/diffplug/spotless/scala/ScalaFmtStep.java
Outdated
Show resolved
Hide resolved
|
NBD, but please push new commits instead of force-pushing. Easier to review only what has changed that way :) |
|
Also thanks for this very good PR, it will definitely get merged :D |
|
So I just added a commit which implements the |
plugin-gradle/src/main/java/com/diffplug/gradle/spotless/ScalaExtension.java
Show resolved
Hide resolved
|
CI is passing now, forgot about the newly formatted files and accidentally deleted a line which I didn't realize. |
|
Just pushed some commits regarding updates/changes in the documentation. |
…lved in serialization/equality, so good to eagerly initialize in the constructor.
|
Perfect, happy with the commit message so feel free to merge and thanks for being responsive on the PR! |
|
Published in |
Uh oh!
There was an error while loading. Please reload this page.