From 2272934a5e5d5f2d0319381bd2f4dc322da78e18 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 8 Feb 2019 17:18:44 +0100 Subject: [PATCH] Stash --- .credo.exs | 3 ++- lib/pleroma/html.ex | 7 ++----- lib/pleroma/web/web.ex | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.credo.exs b/.credo.exs index 8a1cc1c9c..94e19c4b5 100644 --- a/.credo.exs +++ b/.credo.exs @@ -104,7 +104,8 @@ {Credo.Check.Warning.BoolOperationOnSameValues}, {Credo.Check.Warning.IExPry}, {Credo.Check.Warning.IoInspect}, - {Credo.Check.Warning.LazyLogging}, + # Got too much of them, not sure if relevant + {Credo.Check.Warning.LazyLogging, false}, {Credo.Check.Warning.OperationOnSameValues}, {Credo.Check.Warning.OperationWithConstantResult}, {Credo.Check.Warning.UnusedEnumOperation}, diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex index 0fd41ffb8..291b0e612 100644 --- a/lib/pleroma/html.ex +++ b/lib/pleroma/html.ex @@ -83,8 +83,7 @@ defmodule Pleroma.HTML.Scrubber.TwitterText do """ @markup Application.get_env(:pleroma, :markup) - @uri_schemes Application.get_env(:pleroma, :uri_schemes, []) - @valid_schemes Keyword.get(@uri_schemes, :valid_schemes, []) + @valid_schemes Pleroma.Config.get([:uri_schemes, :valid_schemes], []) require HtmlSanitizeEx.Scrubber.Meta alias HtmlSanitizeEx.Scrubber.Meta @@ -125,12 +124,10 @@ defmodule Pleroma.HTML.Scrubber.Default do @doc "The default HTML scrubbing policy: no " require HtmlSanitizeEx.Scrubber.Meta - alias HtmlSanitizeEx.Scrubber.Meta @markup Application.get_env(:pleroma, :markup) - @uri_schemes Application.get_env(:pleroma, :uri_schemes, []) - @valid_schemes Keyword.get(@uri_schemes, :valid_schemes, []) + @valid_schemes Pleroma.Config.get([:uri_schemes, :valid_schemes], []) Meta.remove_cdata_sections_before_scrub() Meta.strip_comments() diff --git a/lib/pleroma/web/web.ex b/lib/pleroma/web/web.ex index 30558e692..4d5fd028e 100644 --- a/lib/pleroma/web/web.ex +++ b/lib/pleroma/web/web.ex @@ -71,6 +71,7 @@ defmodule Pleroma.Web do def router do quote do use Phoenix.Router + # credo:disable-for-next-line Credo.Check.Consistency.MultiAliasImportRequireUse import Plug.Conn import Phoenix.Controller end @@ -78,6 +79,7 @@ defmodule Pleroma.Web do def channel do quote do + # credo:disable-for-next-line Credo.Check.Consistency.MultiAliasImportRequireUse use Phoenix.Channel import Pleroma.Web.Gettext end