-
Notifications
You must be signed in to change notification settings - Fork 460
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
New maven coordinates for 2.0.0 release of Scalafmt #416
Conversation
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.
Thanks for the PR to fix #415! Needs a few tweaks.
lib/src/main/java/com/diffplug/spotless/scala/ScalaFmtStep.java
Outdated
Show resolved
Hide resolved
Here is convo for fixing Travis issue. The CI is still being triggered, and you can see it here, but it's not publishing back to GitHub for some reason... |
Looking at the code in this PR, it occurs to me that we're missing a test that scalafmt 2.0.0+ works as intended. However, I don't have my IDE in front of me at the moment, so it's not easy for me to tell what exactly should be tested and where the test should go. @nedtwigg What do you think? If you agree, would you mind giving @nsutcliffe some guidance on this? :) |
Ah, great catch @jbduncan! Thanks for the fixes @nsutcliffe, one last change and I think we're good to merge. Here's the ScalaFmt test: https://github.com/diffplug/spotless/blob/master/testlib/src/test/java/com/diffplug/spotless/scala/ScalaFmtStepTest.java And here are similar tests for the KtLint step where we made sure that the different groups for the different versions work as expected: spotless/testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java Lines 41 to 67 in dbf857a
|
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.
Add a test
I am aware tests are failing on travis; I know that scalafmt has changes some of the defaults in release 2.0.0; I'll investigate the differences against the changes and make sure they are as a result of changes to the defaults. |
The defaults for align.openParenDefnSite changed to false in 1.6 (see the scalafmt documentation), although I note that they didn't release 1.6, so 2.0.0 is the first chance of us seeing this. I believe this fully explains the difference in the test data, and so have updated with new test data for the 2.0.0 tests. |
Looks great, thanks @nsutcliffe! If you'd like any changes to the credit I just pushed up, lemme know :) Otherwise I'll merge this tomorrow. |
That's great, thank you for your prompt assistance :-) |
Released in x.24.0 |
Scalafmt now releases under org.scalameta rather than com.geirsson as of 2.0.0. Updating so that spotless will work with scalafmt 2.0.0+ (maintains backwards compatability of scalafmt prior to 2.0.0).