fix dialyzer and warnings

This commit is contained in:
shibao 2022-02-17 21:30:05 -05:00
parent ba2294f156
commit 776d8a0250
4 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ defmodule Cannery.MixProject do
aliases: aliases(),
deps: deps(),
dialyzer: [plt_add_apps: [:ex_unit]],
consolidate_protocols: Mix.env() not in [:dev, :test],
# ExDoc
name: "Cannery",
source_url: "https://gitea.bubbletea.dev/shibao/cannery",

View File

@ -4,7 +4,7 @@ defmodule Cannery.AmmoTest do
"""
use Cannery.DataCase
alias Cannery.{Ammo, Ammo.AmmoType, Ammo.AmmoGroup}
alias Cannery.{Ammo, Ammo.AmmoGroup, Ammo.AmmoType}
alias Ecto.Changeset
@moduletag :ammo_test

View File

@ -17,7 +17,7 @@ defmodule CanneryWeb.ConnCase do
use ExUnit.CaseTemplate
import Cannery.Fixtures
alias Cannery.{Accounts, Repo}
alias Cannery.{Accounts, Accounts.User, Repo}
alias Ecto.Adapters.SQL.Sandbox
using do

View File

@ -58,7 +58,7 @@ defmodule Cannery.Fixtures do
[_, html_token, _] = email.html_body |> String.split("[TOKEN]")
[_, text_token, _] = email.text_body |> String.split("[TOKEN]")
text_token = html_token
^text_token = html_token
end
def valid_user_attributes(attrs \\ %{}) do