Skip to content

Commit

Permalink
Add .formatter.exs files for example apps and format them
Browse files Browse the repository at this point in the history
  • Loading branch information
zorbash committed May 30, 2023
1 parent a332a06 commit 7759451
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions examples/phoenix_app/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
import_deps: [:ecto, :phoenix, :plug, :open_api_spex],
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"]
]
4 changes: 2 additions & 2 deletions examples/phoenix_app/lib/phoenix_app/accounts/user.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ defmodule PhoenixApp.Accounts.User do
alias __MODULE__

schema "users" do
field :name, :string
field :email, :string
field(:name, :string)
field(:email, :string)
timestamps()
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ defmodule PhoenixAppWeb.OauthController do
def access_token(conn = %Plug.Conn{}, _params) do
provider_params = conn.body_params

provider_response = HTTPoison.post!(
"https://github.com/login/oauth/access_token",
Jason.encode!(provider_params),
[{"content-type", "application/json"}])
provider_response =
HTTPoison.post!(
"https://github.com/login/oauth/access_token",
Jason.encode!(provider_params),
[{"content-type", "application/json"}]
)

provider_body = provider_response.body

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ defmodule PhoenixAppWeb.ErrorView do
# In case no render clause matches or no
# template is found, let's render it as 500
def template_not_found(_template, assigns) do
render "500.html", assigns
render("500.html", assigns)
end
end
4 changes: 4 additions & 0 deletions examples/plug_app/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
import_deps: [:ecto, :plug, :open_api_spex],
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"]
]

0 comments on commit 7759451

Please sign in to comment.