diff --git a/lib/radiator/accounts.ex b/lib/radiator/accounts.ex index 8f207dc5..71898853 100644 --- a/lib/radiator/accounts.ex +++ b/lib/radiator/accounts.ex @@ -6,7 +6,7 @@ defmodule Radiator.Accounts do import Ecto.Query, warn: false alias Radiator.Repo - alias Radiator.Accounts.{User, UserToken, UserNotifier} + alias Radiator.Accounts.{User, UserNotifier, UserToken} ## Database getters diff --git a/lib/radiator/accounts/user.ex b/lib/radiator/accounts/user.ex index 4aeca846..3412f376 100644 --- a/lib/radiator/accounts/user.ex +++ b/lib/radiator/accounts/user.ex @@ -1,4 +1,7 @@ defmodule Radiator.Accounts.User do + @moduledoc """ + The user model. + """ use Ecto.Schema import Ecto.Changeset diff --git a/lib/radiator/accounts/user_notifier.ex b/lib/radiator/accounts/user_notifier.ex index 0deda5c4..86387652 100644 --- a/lib/radiator/accounts/user_notifier.ex +++ b/lib/radiator/accounts/user_notifier.ex @@ -1,4 +1,7 @@ defmodule Radiator.Accounts.UserNotifier do + @moduledoc """ + Handles notification emails for users. + """ import Swoosh.Email alias Radiator.Mailer diff --git a/lib/radiator/accounts/user_token.ex b/lib/radiator/accounts/user_token.ex index 03c0a8d8..487d6bc0 100644 --- a/lib/radiator/accounts/user_token.ex +++ b/lib/radiator/accounts/user_token.ex @@ -1,4 +1,7 @@ defmodule Radiator.Accounts.UserToken do + @moduledoc """ + Token handling for user sessions. + """ use Ecto.Schema import Ecto.Query alias Radiator.Accounts.UserToken diff --git a/lib/radiator/mailer.ex b/lib/radiator/mailer.ex index 100e15a8..2ae4dad1 100644 --- a/lib/radiator/mailer.ex +++ b/lib/radiator/mailer.ex @@ -1,3 +1,4 @@ defmodule Radiator.Mailer do + @moduledoc false use Swoosh.Mailer, otp_app: :radiator end diff --git a/lib/radiator/outline.ex b/lib/radiator/outline.ex index da7d6e4c..e109f28d 100644 --- a/lib/radiator/outline.ex +++ b/lib/radiator/outline.ex @@ -2,11 +2,9 @@ defmodule Radiator.Outline do @moduledoc """ The Outline context. """ - import Ecto.Query, warn: false - alias Radiator.Repo - alias Radiator.Outline.Node + alias Radiator.Repo @doc """ Returns the list of nodes. diff --git a/lib/radiator/outline/node.ex b/lib/radiator/outline/node.ex index 5e9f2ea2..e928a0a9 100644 --- a/lib/radiator/outline/node.ex +++ b/lib/radiator/outline/node.ex @@ -1,4 +1,8 @@ defmodule Radiator.Outline.Node do + @moduledoc """ + The node model which represents a single node in the outline. + Currenty there is no concept of a tree + """ use Ecto.Schema import Ecto.Changeset diff --git a/lib/radiator_web/components/core_components.ex b/lib/radiator_web/components/core_components.ex index 42b63c3c..ede24885 100644 --- a/lib/radiator_web/components/core_components.ex +++ b/lib/radiator_web/components/core_components.ex @@ -16,7 +16,9 @@ defmodule RadiatorWeb.CoreComponents do """ use Phoenix.Component + alias Phoenix.HTML.Form alias Phoenix.LiveView.JS + import RadiatorWeb.Gettext @doc """ @@ -303,7 +305,7 @@ defmodule RadiatorWeb.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""" diff --git a/lib/radiator_web/components/layouts.ex b/lib/radiator_web/components/layouts.ex index 52a6c44b..4e2fe97c 100644 --- a/lib/radiator_web/components/layouts.ex +++ b/lib/radiator_web/components/layouts.ex @@ -1,4 +1,5 @@ defmodule RadiatorWeb.Layouts do + @moduledoc false use RadiatorWeb, :html embed_templates "layouts/*" diff --git a/lib/radiator_web/telemetry.ex b/lib/radiator_web/telemetry.ex index 4cb0b971..7ccd2c56 100644 --- a/lib/radiator_web/telemetry.ex +++ b/lib/radiator_web/telemetry.ex @@ -1,4 +1,5 @@ defmodule RadiatorWeb.Telemetry do + @moduledoc false use Supervisor import Telemetry.Metrics diff --git a/lib/radiator_web/user_auth.ex b/lib/radiator_web/user_auth.ex index ff2c37fe..3e20cc1a 100644 --- a/lib/radiator_web/user_auth.ex +++ b/lib/radiator_web/user_auth.ex @@ -1,4 +1,7 @@ defmodule RadiatorWeb.UserAuth do + @moduledoc """ + This module provides functions to log in and log out users. + """ use RadiatorWeb, :verified_routes import Plug.Conn diff --git a/test/support/data_case.ex b/test/support/data_case.ex index e9c735d1..38036b68 100644 --- a/test/support/data_case.ex +++ b/test/support/data_case.ex @@ -15,6 +15,7 @@ defmodule Radiator.DataCase do """ use ExUnit.CaseTemplate + alias Ecto.Adapters.SQL.Sandbox using do quote do @@ -36,8 +37,8 @@ defmodule Radiator.DataCase do Sets up the sandbox based on the test tags. """ def setup_sandbox(tags) do - pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Radiator.Repo, shared: not tags[:async]) - on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end) + pid = Sandbox.start_owner!(Radiator.Repo, shared: not tags[:async]) + on_exit(fn -> Sandbox.stop_owner(pid) end) end @doc """