[erlang-questions] EDoc - Generate Docs For Private Functions

Miguel Morales therevoltingx@REDACTED
Sun Dec 25 11:50:22 CET 2011


Indeed I'm using -compile(export_all).  I did this to quickly develop the
modules, but now I'm going over the modules to document them and clean them
up.  However, I would like to document all functions, including private
functions.

As per this thread:
http://forum.trapexit.org/viewtopic.php?p=20207&sid=343e222874c9a34b228a122638fa2d73
It seems that edoc can generate docs for private functions even if I use
export_all:

If you just use export_all to tweak the behaviour of edoc,
> then try using the 'private' option instead.


I was hoping to auto-generate docs for all functions automatically and then
go back and document their specs and what not.  But if I have to use export
then it'll just be a bit more tedious, but not really a big deal.

I was just hoping that the option tuple for application:.. would recognize
the option.

Thanks.

On Sun, Dec 25, 2011 at 2:30 AM, Richard Carlsson <
carlsson.richard@REDACTED> wrote:
> On 12/25/2011 03:02 AM, Miguel Morales wrote:
>>
>> Hi All,
>>
>> I'm starting to use edoc to document an existing erlang code base.
>> The easiest way I've found is to add a doc target to my Makefile that
>> does the following:
>>
>> DOC_OPTS={{private,true}, {todo,true}, def,{version,\"${VERSION}\"}}
>> erl -pa ./ebin -noshell -eval "edoc:application(${APPNAME}, \".\",
>> [${DOC_OPTS}])." -s init stop
>>
>> However, there is no html documentation generated for modules that
>> don't explicitly export its functions.
>
>
> I have problems understanding this statement. Are you using
> -compile(export_all) instead of -export(...)? In that case, don't do that.
> If it's generated code, then generate the export lists as well.
>
>  /Richard
>
>> I see in the documentation edoc:get_doc which takes an options tuple
>> but I'm not sure what the best way to use this with the existing
>> makefile by adding the least amount of code.  That's why I was hoping
>> that edoc:application would honor the {private, true} flag.
>>
>> Any hints or ideas?
>>
>> Thanks for any help.
>>
>> --
>> ~ Jeremiah:9:23-24
>> Android 2D MMORPG: http://solrpg.com/,
>> http://www.youtube.com/user/revoltingx
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/,
http://www.youtube.com/user/revoltingx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111225/3f19d99a/attachment.htm>


More information about the erlang-questions mailing list