如何控制edoc文件中的函数顺序?

时间:2015-11-02 13:19:45

标签: erlang edoc

我想为一个erlang模块生成edoc文件,这是我的代码http://ideone.com/TFktht

我想要oder导出api接口,但我不能成功。

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.

edoc中的这些导出的api不是odered。 我想要:

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

1 个答案:

答案 0 :(得分:2)

订购功能

将它放在你的rebar.config中:

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

或者您可以使用以下内容生成单个doc文件:

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

"文档"作为输出目录。

实现特定订单

关闭功能排序,如上所述,但使用{sort_functions, false}并根据需要在源中对功能进行排序。