forked from YokaiRick/akkoma
Treat warnings as errors outside of tests.
This commit is contained in:
parent
e94c3442f4
commit
c81c74d847
6 changed files with 12 additions and 9 deletions
|
@ -150,7 +150,7 @@ def handle(type, _) do
|
||||||
end
|
end
|
||||||
|
|
||||||
if Mix.env() == :test do
|
if Mix.env() == :test do
|
||||||
def enqueue(type, payload, priority \\ 1) do
|
def enqueue(type, payload, _priority \\ 1) do
|
||||||
if Pleroma.Config.get([:instance, :federating]) do
|
if Pleroma.Config.get([:instance, :federating]) do
|
||||||
handle(type, payload)
|
handle(type, payload)
|
||||||
end
|
end
|
||||||
|
|
5
mix.exs
5
mix.exs
|
@ -8,6 +8,11 @@ def project do
|
||||||
elixir: "~> 1.4",
|
elixir: "~> 1.4",
|
||||||
elixirc_paths: elixirc_paths(Mix.env()),
|
elixirc_paths: elixirc_paths(Mix.env()),
|
||||||
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
|
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
|
||||||
|
elixirc_options: if Mix.env() == :test do
|
||||||
|
[]
|
||||||
|
else
|
||||||
|
[warnings_as_errors: true]
|
||||||
|
end,
|
||||||
start_permanent: Mix.env() == :prod,
|
start_permanent: Mix.env() == :prod,
|
||||||
aliases: aliases(),
|
aliases: aliases(),
|
||||||
deps: deps(),
|
deps: deps(),
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
defmodule Pleroma.Builders.ActivityBuilder do
|
defmodule Pleroma.Builders.ActivityBuilder do
|
||||||
alias Pleroma.Builders.UserBuilder
|
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
alias Pleroma.Web.ActivityPub.ActivityPub
|
||||||
|
|
||||||
def build(data \\ %{}, opts \\ %{}) do
|
def build(data \\ %{}, opts \\ %{}) do
|
||||||
|
|
|
@ -13,7 +13,7 @@ def request(
|
||||||
with {:ok, res} <- apply(__MODULE__, method, [url, query, body, headers]) do
|
with {:ok, res} <- apply(__MODULE__, method, [url, query, body, headers]) do
|
||||||
res
|
res
|
||||||
else
|
else
|
||||||
{_, r} = error ->
|
{_, _r} = error ->
|
||||||
# Logger.warn(r)
|
# Logger.warn(r)
|
||||||
error
|
error
|
||||||
end
|
end
|
||||||
|
|
5
test/support/websub_mock.ex
Normal file
5
test/support/websub_mock.ex
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
defmodule Pleroma.Web.WebsubMock do
|
||||||
|
def verify(sub) do
|
||||||
|
{:ok, sub}
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,9 +1,3 @@
|
||||||
defmodule Pleroma.Web.WebsubMock do
|
|
||||||
def verify(sub) do
|
|
||||||
{:ok, sub}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
defmodule Pleroma.Web.WebsubTest do
|
defmodule Pleroma.Web.WebsubTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase
|
||||||
alias Pleroma.Web.Websub
|
alias Pleroma.Web.Websub
|
||||||
|
|
Loading…
Reference in a new issue