You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UnnecessaryFunctionArguments rule is analyzing callback implementations which don't have set @impl before.
To Reproduce
I have this module implementing Plug:
defmodule CoophubWeb.Plug.SubdomainMatcher do
@behaviour Plug
import Plug.Conn, only: [put_private: 3, halt: 1]
import Phoenix.Controller, only: [redirect: 2]
@spec init(Keyword.t()) :: Keyword.t()
def init(_opts) do
Application.get_env(:coophub, CoophubWeb.Endpoint)[:url][:host]
end
REDACTED
end
And I get:
lib/coophub_web/plug/subdomain_matcher.ex:7 - In module CoophubWeb.Plug.SubdomainMatcher: Argument in position 1 of CoophubWeb.Plug.SubdomainMatcher.init/1 is ignored in all of its clauses
Expected Behavior
Ignore callback implementations without @impl (maybe functions with same name/arity used in the module) or suggest to add it. Besides, e.g, the Plug docs don't suggest that thing https://hexdocs.pm/plug/readme.html#hello-world
The text was updated successfully, but these errors were encountered:
Bug Description
The
UnnecessaryFunctionArguments
rule is analyzing callback implementations which don't have set@impl
before.To Reproduce
I have this module implementing
Plug
:And I get:
Expected Behavior
Ignore callback implementations without
@impl
(maybe functions with same name/arity used in the module) or suggest to add it. Besides, e.g, the Plug docs don't suggest that thing https://hexdocs.pm/plug/readme.html#hello-worldThe text was updated successfully, but these errors were encountered: