Elixir custom task does not show up on "mix help"

Viewed 126

Is the following code not enough to list a custom task on mix help?

defmodule Mix.Tasks.Start do
  use Mix.Task

  @shortdoc "Starts [App]"
  def run(_) do
    IO.puts("Starting [App]...")
  end
end

I thought that the decorator @shortdoc was enough to list my custom task on mix help but I recompile my code and my custom task is not being listed on mix help.

1 Answers

In trying it out myself I had to add both a @moduledoc and a @shortdoc. Then I had to run mix compile to get the task on the list in mix help.

Related