Skip to main content

rebar.config

{minimum_otp_vsn, "27"}.

{erl_opts, [
    debug_info,
    warn_missing_spec,
    warnings_as_errors,
    {i, "include"}
]}.

{deps, []}.

{project_plugins, [
    erlfmt,
    rebar3_hank,
    rebar3_ex_doc,
    rebar3_hex
]}.

{erlfmt, [write]}.

{hank, [
    {ignore, [
        %% Test files use CT callbacks with unused args
        "test/**",
        %% Benchmark harness, not shipped in the package
        "bench/**",
        %% Public header: the uuidInfo record ships for callers to match on
        {"include/nuid.hrl", [single_use_hrl_attrs]}
    ]}
]}.

{hex, [
    {doc, ex_doc},
    {build_tools, ["rebar3"]},
    {files, [
        "src",
        "include",
        "rebar.config",
        "README.md",
        "LICENSE",
        "CHANGELOG.md"
    ]}
]}.

{ex_doc, [
    {extras, [
        {<<"README.md">>, #{title => <<"Overview">>}},
        {<<"CHANGELOG.md">>, #{title => <<"Changelog">>}},
        {<<"LICENSE">>, #{title => <<"License">>}}
    ]},
    {main, <<"README.md">>},
    {homepage_url, <<"https://github.com/nomasystems/nuid">>},
    {source_url, <<"https://github.com/nomasystems/nuid">>},
    {api_reference, true},
    {groups_for_modules, [
        {<<"Public API">>, [nuid]},
        {<<"Internal">>, [nuid_base64]}
    ]}
]}.

{xref_checks, [
    undefined_function_calls,
    undefined_functions,
    locals_not_used,
    deprecated_function_calls,
    deprecated_functions
]}.

{dialyzer, [
    {plt_extra_apps, [crypto]}
]}.

{cover_enabled, true}.
{cover_opts, [verbose, {min_coverage, 85}]}.
{cover_excl_mods, [nuid_base64]}.

{ct_opts, [
    {verbose, true},
    {dir, "test"}
]}.

{alias, [
    {check, [compile, {fmt, "--check"}, xref, dialyzer, hank]},
    {test, [ct, cover]}
]}.

{shell, [{apps, [nuid]}]}.

{profiles, [
    {test, [
        {deps, [
            {triq, {git, "https://github.com/nomasystems/triq.git", {branch, "master"}}}
        ]},
        {erl_opts, [nowarn_missing_spec, nowarn_export_all]},
        {extra_src_dirs, ["test/property_test"]}
    ]},
    {bench, [
        {deps, [
            {eflambe, {git, "https://github.com/Stratus3D/eflambe.git", {branch, "master"}}},
            {erlperf, {git, "https://github.com/max-au/erlperf.git", {branch, "master"}}}
        ]},
        {erl_opts, [nowarn_missing_spec]},
        {extra_src_dirs, [{"bench", [{recursive, false}]}]}
    ]}
]}.