-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working