Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unquote functions report no docs/specs #44

Open
ackerdev opened this issue Mar 11, 2022 · 0 comments
Open

unquote functions report no docs/specs #44

ackerdev opened this issue Mar 11, 2022 · 0 comments

Comments

@ackerdev
Copy link

ackerdev commented Mar 11, 2022

I have a module that generates functions from a list at compile time, but doctor does not recognize the doc and spec that exist, reporting my module has having a function that is missing both doc and spec.

Here's an example that should replicate the issue:

defmodule MyModule do
  list = [:foo, :bar, :baz]

  Enum.each(list, fn name ->
    @doc """
      Returns a string representation for #{name}.

          iex> Foo.#{name}()
          #{Atom.to_string(name)}
    """
    @spec unquote(name)() :: binary()
    def unquote(name), do: unquote(Atom.to_string(name))
  end)
end

Technically it's 3 functions, but if doctor could simply report this as 1 function with doc and spec that would be adequate.

@ackerdev ackerdev changed the title Issues with unquote function definitions unquote functions report no docs/specs Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant