{deps, [ %% not all plugins have to depend on emqx %% but if they do, use git_subdir in the default profile {emqx, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.0.0"}, "apps/emqx"}} %% this is my plugin's dependency , {map_sets, "1.1.0"} ]}. {plugins, [ {emqx_plugrel, {git, "https://github.com/emqx/emqx_plugrel.git", {tag, "0.3.0"}}} ]}. {erl_opts, [debug_info]}. {relx, [ {release, {emqx_plugin_upReWrite, "5.0.0"}, %% this is the release version, different from app vsn in .app file [ emqx_plugin_template , map_sets ]} , {dev_mode, false} , {include_erts, false} ]}. %% Additional info of the plugin {emqx_plugrel, [ {authors, ["HLC"]} , {builder, [ {name, "HLC"} , {contact, ""} , {website, ""} ]} , {repo, ""} , {functionality, ["ReWrite"]} , {compatibility, [ {emqx, "~> 5.0"} ]} , {description, "This is a rewrite plugin"} ] }. {xref_checks,[undefined_function_calls,undefined_functions,locals_not_used, deprecated_function_calls,warnings_as_errors,deprecated_functions]}.给这个rebar.config文件加上注释
时间: 2024-03-19 17:42:21 浏览: 15
下面是一个带有注释的rebar.config文件:
```erlang
{deps, [ %% 依赖项配置
%% 不是所有插件都需要依赖于EMQ X,
%% 但如果需要,使用git_subdir在默认配置文件中
{emqx, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.0.0"}, "apps/emqx"}},
%% 这是我的插件的依赖项
{map_sets, "1.1.0"}
]}.
{plugins, [ %% 插件配置
%% emqx_plugrel插件
{emqx_plugrel, {git, "https://github.com/emqx/emqx_plugrel.git", {tag, "0.3.0"}}}
]}.
{erl_opts, [debug_info]}. %% Erlang编译选项
{relx, [ %% relx配置
{release, {emqx_plugin_upReWrite, "5.0.0"}, %% 发布版本,与.app文件中的应用程序版本不同
[emqx_plugin_template, map_sets]} %% 发布版本包含的应用程序
, {dev_mode, false} %% 是否开启开发模式
, {include_erts, false} %% 是否包含ERTS
]}.
{emqx_plugrel, [ %% 插件信息配置
{authors, ["HLC"]} %% 作者
, {builder, [{name, "HLC"}, {contact, ""}, {website, ""}]} %% 构建者信息
, {repo, ""} %% 插件仓库
, {functionality, ["ReWrite"]} %% 插件功能
, {compatibility, [{emqx, "~> 5.0"}]} %% 兼容性
, {description, "This is a rewrite plugin"} %% 插件描述
]}.
{xref_checks, [ %% xref检查
undefined_function_calls %% 未定义的函数调用
, undefined_functions %% 未定义的函数
, locals_not_used %% 未使用的变量
, deprecated_function_calls %% 弃用的函数调用
, warnings_as_errors %% 将警告视为错误
, deprecated_functions %% 弃用的函数
]}.
```