BlackMamba
BlackMamba

Reputation: 10252

How to control the function order in edoc file?

i want to generate the edoc file for one erlang module, here is my code http://ideone.com/TFktht,

I want oder the export api interface, but i can not success.

generate_log_statistics/4   Analyse the log files and draw graph.
prepare_sipp_cmd/3  Shows SIPp online help documentation of what config parameters there are.
prepare_systeminfo_filenames/1  Prepare the log files according which blades you want to monitor.
run_scenario/6  Run the SIPp scenario.
start_collect_system_infos/1    Start collecting the logs.
stop_collect_system_infos/1 Stop collecting the logs.

These exported api in edoc are not odered. I want:

prepare_sipp_cmd/3
prepare_systeminfo_filenames/1
start_collect_system_infos/1 
run_scenario/6
start_collect_system_infos/1 
generate_log_statistics/4

Upvotes: 3

Views: 87

Answers (1)

Michael
Michael

Reputation: 3729

To order functions

Put this in your rebar.config:

{edoc_opts, [{sort_functions, true}]}.

Or you can generate single doc files with something like:

edoc:file("src/foo.erl", [{dir, "doc"}, {sort_functions, true}]).

"doc" being the output directory.

To achieve specific order

Turn off function sorting, as above, but with {sort_functions, false} and order the functions in your source as required.

Upvotes: 2

Related Questions