-
Notifications
You must be signed in to change notification settings - Fork 87
Format code with scalafmt + test format via travis #129
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
Conversation
36c8613
to
94409d9
Compare
chmod +x $SCALAFMT | ||
fi | ||
|
||
$SCALAFMT "$@" |
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.
Why is it useful to run scalafmt on the CI?
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.
It's to make sure you don't push code that is not formatted. I create a separate matrix entry so you know that the CI failed only because the code was not formatted, and not more serious test failures.
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.
Forcing to use a specific code formatter and a specific style looks more constraining than valuable to me. What problem did you encounter without using a code formatter?
How to legitimately agree on the code style to use? For instance, I prefer this style of scaladoc comments:
over this one:
|
I manually formatted code: before: scala-collection-compat/src/main/scala-2.11_2.12/scala/collection/compat/package.scala Lines 14 to 15 in a4c5413
after: scala-collection-compat/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala Lines 44 to 48 in 93d3d66
|
94409d9
to
5a6ef44
Compare
No description provided.