lpil / dogma

:closed_lock_with_key: A code style linter for Elixir
Other
471 stars 52 forks source link

Implementing the Inspect protocol causes a TakenName error #241

Closed rhruiz closed 7 years ago

rhruiz commented 7 years ago

Hello,

implementing the Inspect protocol for a module causes a

TakenName:inspectis already taken and overrides standard library

and I should not feel ashamed of that.

Here is a sample code that triggers the complaint:

defmodule MyModule do
  defstruct :param
end

defimpl Inspect, for: MyModule do
  def inspect(_, _), do: "<my module inspection here>"
end
lpil commented 7 years ago

Some existing discussion over in https://github.com/lpil/dogma/issues/201

lpil commented 7 years ago

I think I might just remove this rule. Thoughts?

rhruiz commented 7 years ago

I will close this one, let's keep that in #201

Search did not find the defimpl I searching for before opening this one.