免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1321 | 回复: 1
打印 上一主题 下一主题

[函数] 【erl_tidy】 代码格式整理 [复制链接]

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-01-15 12:30 |只看该作者 |倒序浏览
file(Name::filename(), Options::[term()]) -> ok


Tidies an Erlang source code file.

Available options are:

{backup_suffix, string()}
Specifies the file name suffix to be used when a backup file is created; the default value is ".bak" (cf. the backups option).

{backups, boolean()}
If the value is true, existing files will be renamed before new files are opened for writing. The new names are formed by appending the string given by the backup_suffix option to the original name. The default value is true.

{dir, filename()}
Specifies the name of the directory in which the output file is to be written. By default, the current directory is used. If the value is an empty string, the current directory is used.

{outfile, filename()}
Specifies the name of the file (without suffix) to which the resulting source code is to be written. If this option is not specified, the Name argument is used.

{printer, Function}
Function = (syntaxTree()) -> string()

Specifies a function for prettyprinting Erlang syntax trees. This is used for outputting the resulting module definition. The function is assumed to return formatted text for the given syntax tree, and should raise an exception if an error occurs. The default formatting function calls erl_prettypr:format/2.

{test, boolean()}
If the value is true, no files will be modified; this is typically most useful if the verbose flag is enabled, to generate reports about the program files without affecting them. The default value is false.

See the function module/2 for further options.

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
2 [报告]
发表于 2015-02-03 22:54 |只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP