Skip to content

Commit 7759451

Browse files
committed
Add .formatter.exs files for example apps and format them
1 parent a332a06 commit 7759451

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

examples/phoenix_app/.formatter.exs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
import_deps: [:ecto, :phoenix, :plug, :open_api_spex],
3+
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

examples/phoenix_app/lib/phoenix_app/accounts/user.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ defmodule PhoenixApp.Accounts.User do
33
alias __MODULE__
44

55
schema "users" do
6-
field :name, :string
7-
field :email, :string
6+
field(:name, :string)
7+
field(:email, :string)
88
timestamps()
99
end
1010

examples/phoenix_app/lib/phoenix_app_web/controllers/oauth_controller.ex

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ defmodule PhoenixAppWeb.OauthController do
44
def access_token(conn = %Plug.Conn{}, _params) do
55
provider_params = conn.body_params
66

7-
provider_response = HTTPoison.post!(
8-
"https://github.com/login/oauth/access_token",
9-
Jason.encode!(provider_params),
10-
[{"content-type", "application/json"}])
7+
provider_response =
8+
HTTPoison.post!(
9+
"https://github.com/login/oauth/access_token",
10+
Jason.encode!(provider_params),
11+
[{"content-type", "application/json"}]
12+
)
1113

1214
provider_body = provider_response.body
1315

examples/phoenix_app/lib/phoenix_app_web/views/error_view.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ defmodule PhoenixAppWeb.ErrorView do
1212
# In case no render clause matches or no
1313
# template is found, let's render it as 500
1414
def template_not_found(_template, assigns) do
15-
render "500.html", assigns
15+
render("500.html", assigns)
1616
end
1717
end

examples/plug_app/.formatter.exs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
import_deps: [:ecto, :plug, :open_api_spex],
3+
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

0 commit comments

Comments
 (0)