-
Notifications
You must be signed in to change notification settings - Fork 2
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
Format logout #51
Format logout #51
Conversation
@@ -12,25 +12,24 @@ defmodule AppWeb.PageController do | |||
def index(conn, _params) do | |||
url_oauth_google = ElixirAuthGoogle.generate_oauth_url(conn) | |||
changeset = Person.changeset_registration(%Person{}, %{}) | |||
render(conn, "index.html", | |||
[url_oauth_google: url_oauth_google, changeset: changeset]) | |||
render(conn, "index.html", url_oauth_google: url_oauth_google, changeset: changeset) |
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.
After running mix format
this line is now 88 characters long ...
can we add line_length: 80
to .formatter.exs
to avoid super-long-lines?
see: https://medium.com/blackode/code-formatter-the-big-feature-in-elixir-v1-6-0-f6572061a4ba
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.
Added line_length: 80
👍
@@ -1,7 +1,8 @@ | |||
defmodule AppWeb.GoogleAuthController do | |||
use AppWeb, :controller | |||
|
|||
@elixir_auth_google Application.get_env(:app, :elixir_auth_google) || ElixirAuthGoogle | |||
@elixir_auth_google Application.get_env(:app, :elixir_auth_google) || | |||
ElixirAuthGoogle |
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.
I don't understand why mix format
is indenting this ElixirAuthGoogle
by 24 characters ... 😕
Not that it's a problem, I just want to understand if it's consistent. 💭
@@ -2,6 +2,8 @@ | |||
<img class="br-100 fl " width="32px" src="<%= @person.picture %>" /> | |||
</a> | |||
|
|||
<a class="db tr pointer dwyl-teal" href="<%= Routes.person_path(@conn, :logout) %>">Log out</a> |
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.
Apparently eex
templates aren't checked for length by mix format
... 95 characters. 💭
@invalid_attrs %{email: nil, email_hash: nil, familyName: nil, givenName: nil, key_id: nil, password_hash: nil, username: nil, username_hash: nil} | ||
|
||
@valid_attrs %{ | ||
email: "[email protected]", |
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.
This is more vertical scrolling but it's much easier read. 👍
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.
@SimonLab mix format
of logout code looks good. thanks. 👍
format phoenix/elixir files with
mix format
This PR might be better to look at after #49