-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Formmating: Add white space around vertical bar #4507
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
Formmating: Add white space around vertical bar #4507
Conversation
@lexmag it is your call. :) |
I have no strong opinion on it but personally I am not convinced it's an improvement. |
It's a huge amount of changes and we'll be blaming @eksperimental for years in git :P, but maybe this is an improvement after all (consistency is good). We'd have to pay a lot of attention when reviewing PRs so that we don't reintroduce |
@@ -943,8 +943,8 @@ defmodule Enum do | |||
end) |> :lists.reverse() | |||
|
|||
case list do | |||
[] -> [] | |||
[_|t] -> t # Head is a superfluous intersperser element | |||
[] -> [] |
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.
Let's fix this the other way around to [] -> []
.
26ce9db
to
ae42bff
Compare
@lexmag all fixed, and a few more than i found with a search command. I looked for changes in line containing the CI build failed, but I think it's unrelated, since locally it just passed |
I think this is a pretty good improvement for readability. Of the handful of Elixir docs that I've read through (like here), |
ae42bff
to
a7a7f6f
Compare
a7a7f6f
to
8ac6f20
Compare
@lexmag: rebased to master |
Seems to be the right time: - elixir-lang/elixir#4507 - elixir-lang/elixir-lang.github.com#733
Seems GitHub has fixed the whitespace ignoring feature |
@lexmag sweet! |
It adds a white space around the vertical bar, improving readability of the code.
Carefully edited, and thoroughly reviewed three times.
While the amount of lines edited is significant, I think it's a great improvement in the clarity of the code.