Skip to content
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

Add Scalafmt #210

Merged
merged 2 commits into from
Jan 8, 2020
Merged

Add Scalafmt #210

merged 2 commits into from
Jan 8, 2020

Conversation

travisbrown
Copy link
Contributor

I think it makes sense to go ahead and do this. I've copied the configuration from Cats.

@@ -17,7 +17,7 @@ matrix:
- jdk: openjdk11

script:
- sbt "+ test"
- sbt ";scalafmtSbtCheck; +scalafmtCheckAll; +test"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the + really necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean on the scalafmtCheckAll? It's not strictly necessary since there's no version-specific code at the moment, but if we do add it (for Dotty or whatever), it would be really easy to forget to change this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point!

@travisbrown
Copy link
Contributor Author

@non Do you have any objection to Scalafmt here?

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one change I'd like to make from cats is to set align: none. The default looks nice, but bloats diffs. You can see it here in the case statements.

@travisbrown
Copy link
Contributor Author

@rossabaker Done. I do prefer the aligned version at this point, personally, but I guess we can change it in the future.

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 to the concept and I trust you on cleaning up the conflict. We may wish to squash this one to minimize whitespace churn in the history.

@travisbrown
Copy link
Contributor Author

Should be good now, and yes, agree on squashing!

@travisbrown
Copy link
Contributor Author

I went ahead and rebased manually since it was getting kind of messy. Will merge when green.

@travisbrown travisbrown merged commit f1b95ec into master Jan 8, 2020
@travisbrown travisbrown mentioned this pull request Jan 8, 2020
@travisbrown travisbrown deleted the topic/scalafmt branch January 10, 2020 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants