Skip to content

Commit

Permalink
fix credo warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
daveminer committed Oct 27, 2023
1 parent 5d5740d commit 2b14f9b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/basket/mailer.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@moduledoc false
defmodule Basket.Mailer do
use Swoosh.Mailer, otp_app: :basket
end
3 changes: 2 additions & 1 deletion lib/basket_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defmodule BasketWeb.CoreComponents do
use Phoenix.Component

alias Phoenix.LiveView.JS
alias Phoenix.HTML.Form
import BasketWeb.Gettext

@doc """
Expand Down Expand Up @@ -303,7 +304,7 @@ defmodule BasketWeb.CoreComponents do
def input(%{type: "checkbox"} = assigns) do
assigns =
assign_new(assigns, :checked, fn ->
Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value])
Form.normalize_value("checkbox", assigns[:value])
end)

~H"""
Expand Down
1 change: 1 addition & 0 deletions lib/basket_web/components/layouts.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@moduledoc false
defmodule BasketWeb.Layouts do
use BasketWeb, :html

Expand Down
1 change: 1 addition & 0 deletions lib/basket_web/live/demo.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@moduledoc false
defmodule BasketWeb.Demo do
use BasketWeb, :surface_live_view

Expand Down
3 changes: 3 additions & 0 deletions lib/basket_web/telemetry.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@moduledoc """
Telemetry configuration
"""
defmodule BasketWeb.Telemetry do
use Supervisor
import Telemetry.Metrics
Expand Down
6 changes: 4 additions & 2 deletions test/support/data_case.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ defmodule Basket.DataCase do

use ExUnit.CaseTemplate

alias Ecto.Adapters.SQL.Sandbox

using do
quote do
alias Basket.Repo
Expand All @@ -36,8 +38,8 @@ defmodule Basket.DataCase do
Sets up the sandbox based on the test tags.
"""
def setup_sandbox(tags) do
pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Basket.Repo, shared: not tags[:async])
on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
pid = Sandbox.start_owner!(Basket.Repo, shared: not tags[:async])
on_exit(fn -> Sandbox.stop_owner(pid) end)
end

@doc """
Expand Down

0 comments on commit 2b14f9b

Please sign in to comment.