ExDoc adds documentation for several Phoenix functions to each of my View pages:
__phoenix_recompile__?()
__resource__()
__templates__()
render(template, assigns \\ %{})
template_not_found(template, assigns)
These entries (and their index entries) are basically noise, from my point of view. I suspect that they are being brought in via a use statement; is there a way to remove them?
The template.ex and view.ex files already contain@doc entries for these functions. Because they are located inside macros, they get brought in by use statements. However, the code is beyond my pay grade to modify:
defmodule Phoenix.Template do
...
@doc false
defmacro __before_compile__(env) do
...
quote do
...
@doc """
Returns the template root alongside all templates.
"""
def __templates__ do
{@phoenix_root, @phoenix_pattern, unquote(names)}
end
...
end
It’s also possible that someone wants these functions to be documented in every View. So, before I even post an issue, I’d like to get a bit more feedback. (ducks)
I’m afraid I don’t understand how to implement this suggestion. It sounds like I would need to put five sets of @doc false and def foo() statements before the use PhxHttpWeb, :view line in each of my View files.
Even if this worked, it would not be pretty, though I suppose I could create a file that encapsulated all of the fugliness and invoke it with another use statement. Did you have something like this in mind?
I personally like everything being documented that is publicly accessible and called. ^.^
Even if it’s first line is “INTERNAL USE ONLY”, it should still be documented as to what it takes and does and all.