Skip to content

callbacks implementations are not listed in the module if @impl true #1352

@eksperimental

Description

@eksperimental

Given the following example.

defmodule SomeCallback do
  @doc """
  My documentation here
  """
  @callback something() :: keyword()
end


defmodule ImplTrue do
  @behaviour SomeCallback

  @impl true
  def something() do
    [a: "apple"]
  end

  @doc "bar..."
  def bar(), do: :ok
end


defmodule NoImpl do
  @behaviour SomeCallback

  def something() do
    [a: "apple"]
  end

  @doc "bar..."
  def bar(), do: :ok
end

mix docs for ImplTrue will not list something/1, while for NoImpl it shows the function.
Originally reported by vrod in https://elixirforum.com/t/documentation-for-callback/38758

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions