Skip to content

Commit

Permalink
Fix credo warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-sidorov committed Nov 29, 2024
1 parent 6e842e3 commit 162f43d
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/budget_tracker/accounts/user.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule BudgetTracker.Accounts.User do
@moduledoc false
use Ecto.Schema
import Ecto.Changeset
alias BudgetTracker.{DebitAccounts.DebitAccount, Operations.Operation}
Expand Down
1 change: 1 addition & 0 deletions lib/budget_tracker/accounts/user_notifier.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule BudgetTracker.Accounts.UserNotifier do
@moduledoc false
import Swoosh.Email

alias BudgetTracker.Mailer
Expand Down
1 change: 1 addition & 0 deletions lib/budget_tracker/accounts/user_token.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule BudgetTracker.Accounts.UserToken do
@moduledoc false
use Ecto.Schema
import Ecto.Query
alias BudgetTracker.Accounts.UserToken
Expand Down
3 changes: 3 additions & 0 deletions lib/budget_tracker/currencies/currency.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule BudgetTracker.Currencies.Currency do
@moduledoc """
Money currency in common sense.
"""
use Ecto.Schema
import Ecto.Changeset
alias BudgetTracker.{DebitAccounts.DebitAccount, Operations.Operation}
Expand Down
4 changes: 4 additions & 0 deletions lib/budget_tracker/debit_accounts/debit_account.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
defmodule BudgetTracker.DebitAccounts.DebitAccount do
@moduledoc """
Debit account shows current amount of money in proper currency.
User can have multiple debit accounts, of course.
"""
alias BudgetTracker.{Currencies.Currency, Accounts.User, Operations.Operation}
use Ecto.Schema
import Ecto.Changeset
Expand Down
3 changes: 3 additions & 0 deletions lib/budget_tracker/operation_categories/operation_category.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule BudgetTracker.OperationCategories.OperationCategory do
@moduledoc """
Category helps to separate operations by purpose and target of payment.
"""
use Ecto.Schema
import Ecto.Changeset
alias BudgetTracker.Operations.Operation
Expand Down
6 changes: 6 additions & 0 deletions lib/budget_tracker/operations/operation.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
defmodule BudgetTracker.Operations.Operation do
@moduledoc """
Model of operation with money.
Income is an operation with type :increase
Payment is an operation with type :descrease
Transfer from one debit account to another is a transaction of two: income + payment.
"""
use Ecto.Schema
import Ecto.Changeset

Expand Down
4 changes: 4 additions & 0 deletions lib/budget_tracker_web/components/mishka_components.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
defmodule BudgetTrackerWeb.Components.MishkaComponents do
@moduledoc """
Import of Miska Component UI library
See details: https://mishka.tools/chelekom/docs
"""
defmacro __using__(_) do
quote do
import BudgetTrackerWeb.Components.Accordion, only: [accordion: 1, native_accordion: 1]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule BudgetTrackerWeb.AccountsLive.Components.AccountCard do

Check warning on line 1 in lib/budget_tracker_web/live/accounts_live/components/account_card.ex

View workflow job for this annotation

GitHub Actions / Compile

ignoring template "/home/runner/work/budget_tracker/budget_tracker/lib/budget_tracker_web/live/accounts_live/components/account_card.html.heex" because the LiveView BudgetTrackerWeb.AccountsLive.Components.AccountCard defines a render/1 function

Check warning on line 1 in lib/budget_tracker_web/live/accounts_live/components/account_card.ex

View workflow job for this annotation

GitHub Actions / Test

ignoring template "/home/runner/work/budget_tracker/budget_tracker/lib/budget_tracker_web/live/accounts_live/components/account_card.html.heex" because the LiveView BudgetTrackerWeb.AccountsLive.Components.AccountCard defines a render/1 function
@moduledoc """
LiveComponent for Debit Account Card
"""
use BudgetTrackerWeb, :live_component

@income_event "income_event"
Expand Down
1 change: 1 addition & 0 deletions lib/budget_tracker_web/user_auth.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule BudgetTrackerWeb.UserAuth do
@moduledoc false
use BudgetTrackerWeb, :verified_routes

import Plug.Conn
Expand Down

0 comments on commit 162f43d

Please sign in to comment.