如何控制edoc文件中的功能顺序?

3
我希望能够为一个Erlang模块生成edoc文件,这是我的代码http://ideone.com/TFktht
我想要对导出的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没有排序,我希望:

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个回答

2

关于函数排序

在你的rebar.config中加入以下内容:

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

或者你可以使用类似以下方式来生成单个文档文件:

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

"doc"是输出目录。

实现特定的顺序

关闭函数排序功能,如上所述,但使用{sort_functions, false},并按照需要在源代码中排序函数。


我不使用rebar,只使用源文件,我使用以下命令:edoc:files(["sbgEstSupport.erl"], [{sort_functions, false}]).,但它无法工作。 - BlackMamba
edoc:files(["sbgEstSupport.erl"], [{dir, "."}, {sort_functions, false}]). - Michael

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接