2024-10-17 22:37:46 +00:00
|
|
|
%% Common project erlang options.
|
|
|
|
{erl_opts, [
|
|
|
|
% mandatory
|
|
|
|
%% debug_info,
|
|
|
|
%% warnings_as_errors,
|
|
|
|
%% warn_export_all,
|
|
|
|
%% warn_missing_spec,
|
|
|
|
%% warn_untyped_record,
|
|
|
|
%% warn_export_vars,
|
|
|
|
|
|
|
|
% by default
|
|
|
|
%% warn_unused_record,
|
|
|
|
%% warn_bif_clash,
|
|
|
|
%% warn_obsolete_guard,
|
|
|
|
%% warn_unused_vars,
|
|
|
|
%% warn_shadow_vars,
|
|
|
|
%% warn_unused_import,
|
|
|
|
%% warn_unused_function,
|
|
|
|
%% warn_deprecated_function
|
|
|
|
|
|
|
|
% at will
|
|
|
|
% bin_opt_info
|
|
|
|
% no_auto_import
|
|
|
|
% warn_missing_spec_all
|
|
|
|
]}.
|
|
|
|
|
|
|
|
% Common project dependencies.
|
|
|
|
{deps, [
|
|
|
|
{genlib, {git, "https://github.com/valitydev/genlib.git", {branch, "master"}}},
|
|
|
|
{cowboy_draining_server, {git, "https://github.com/valitydev/cowboy_draining_server.git", {branch, "master"}}},
|
|
|
|
{uuid, {git, "https://github.com/okeuday/uuid.git", {branch, "master"}}},
|
|
|
|
{scoper, {git, "https://github.com/valitydev/scoper.git", {branch, "master"}}},
|
|
|
|
{erl_health, {git, "https://github.com/valitydev/erlang-health.git", {branch, "master"}}},
|
|
|
|
{cowboy_cors, {git, "https://github.com/valitydev/cowboy_cors.git", {branch, master}}},
|
|
|
|
{cowboy_access_log, {git, "https://github.com/valitydev/cowboy_access_log.git", {branch, "master"}}},
|
|
|
|
{woody_user_identity, {git, "https://github.com/valitydev/woody_erlang_user_identity.git", {branch, "master"}}},
|
|
|
|
{woody, {git, "https://github.com/valitydev/woody_erlang.git", {branch, master}}},
|
2024-11-01 22:34:09 +00:00
|
|
|
{damsel, {git, "https://github.com/valitydev/damsel.git", {branch, "IMP-281/dmt_v2_proto"}}},
|
2024-10-17 22:37:46 +00:00
|
|
|
|
|
|
|
%% Libraries for postgres interaction
|
2024-11-01 22:34:09 +00:00
|
|
|
{epg_connector, {git, "https://github.com/valitydev/epg_connector.git", {branch, master}}},
|
2024-10-17 22:37:46 +00:00
|
|
|
{epgsql, {git, "https://github.com/epgsql/epgsql.git", {tag, "4.7.1"}}},
|
|
|
|
{epgsql_pool, {git, "https://github.com/wgnet/epgsql_pool", {branch, "master"}}},
|
|
|
|
{herd, {git, "https://github.com/wgnet/herd.git", {tag, "1.3.4"}}},
|
|
|
|
|
|
|
|
%% For db migrations
|
|
|
|
{envloader, {git, "https://github.com/nuex/envloader.git", {branch, "master"}}},
|
|
|
|
eql,
|
|
|
|
getopt,
|
|
|
|
|
2024-11-01 22:34:09 +00:00
|
|
|
{prometheus, "4.11.0"},
|
2024-10-17 22:37:46 +00:00
|
|
|
{prometheus_cowboy, "0.1.8"},
|
|
|
|
|
|
|
|
%% OpenTelemetry deps
|
|
|
|
{opentelemetry_api, "1.2.1"},
|
|
|
|
{opentelemetry, "1.3.0"},
|
|
|
|
{opentelemetry_exporter, "1.3.0"}
|
|
|
|
]}.
|
|
|
|
|
|
|
|
%% XRef checks
|
|
|
|
{xref_checks, [
|
|
|
|
undefined_function_calls,
|
|
|
|
undefined_functions,
|
|
|
|
deprecated_functions_calls,
|
|
|
|
deprecated_functions
|
|
|
|
]}.
|
|
|
|
|
|
|
|
%% Dialyzer static analyzing
|
|
|
|
{dialyzer, [
|
|
|
|
{warnings, [
|
|
|
|
% mandatory
|
|
|
|
unmatched_returns,
|
|
|
|
error_handling,
|
|
|
|
% race_conditions,
|
|
|
|
unknown
|
|
|
|
]},
|
|
|
|
{plt_apps, all_deps},
|
|
|
|
{incremental, true}
|
|
|
|
]}.
|
|
|
|
|
2024-11-01 22:34:09 +00:00
|
|
|
{profiles, [
|
|
|
|
{prod, [
|
|
|
|
{deps, [
|
|
|
|
% for introspection on production
|
|
|
|
{recon, "2.5.2"},
|
|
|
|
{logger_logstash_formatter,
|
|
|
|
{git, "https://github.com/valitydev/logger_logstash_formatter.git", {ref, "08a66a6"}}},
|
|
|
|
{iosetopts, {git, "https://github.com/valitydev/iosetopts.git", {ref, "edb445c"}}}
|
|
|
|
]},
|
|
|
|
{relx, [
|
|
|
|
{release, {dmt, "0.1"}, [
|
|
|
|
iosetopts,
|
|
|
|
{recon, load},
|
|
|
|
{runtime_tools, load},
|
|
|
|
{tools, load},
|
|
|
|
{opentelemetry, temporary},
|
|
|
|
logger_logstash_formatter,
|
|
|
|
sasl,
|
|
|
|
dmt
|
|
|
|
]},
|
|
|
|
{mode, minimal},
|
|
|
|
{sys_config, "./config/sys.config"},
|
|
|
|
{vm_args, "./config/vm.args"},
|
|
|
|
{extended_start_script, true}
|
|
|
|
]}
|
|
|
|
]},
|
|
|
|
{test, [
|
|
|
|
{deps, [
|
|
|
|
{meck, "0.9.2"}
|
|
|
|
]},
|
|
|
|
{dialyzer, [
|
|
|
|
{plt_extra_apps, [
|
|
|
|
eunit,
|
|
|
|
common_test,
|
|
|
|
runtime_tools,
|
|
|
|
damsel,
|
|
|
|
meck
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
]}.
|
|
|
|
|
2024-10-17 22:37:46 +00:00
|
|
|
{project_plugins, [
|
|
|
|
{rebar3_lint, "3.2.6"},
|
|
|
|
{erlfmt, "1.5.0"},
|
|
|
|
{covertool, "2.0.6"}
|
|
|
|
]}.
|
|
|
|
|
|
|
|
%% Linter config.
|
|
|
|
{elvis_output_format, colors}.
|
|
|
|
|
|
|
|
{erlfmt, [
|
|
|
|
{print_width, 120},
|
|
|
|
{files, [
|
|
|
|
"apps/dmt*/{src,include,test}/*.{hrl,erl,app.src}",
|
|
|
|
"rebar.config",
|
|
|
|
"elvis.config",
|
|
|
|
"config/sys.config",
|
|
|
|
"test/*/sys.config"
|
|
|
|
]}
|
|
|
|
]}.
|
|
|
|
|
|
|
|
{covertool, [
|
|
|
|
{coverdata_files, [
|
|
|
|
"eunit.coverdata",
|
|
|
|
"ct.coverdata"
|
|
|
|
]}
|
|
|
|
]}.
|
2024-07-24 13:55:59 +00:00
|
|
|
|
|
|
|
{shell, [
|
2024-10-17 22:37:46 +00:00
|
|
|
{config, "config/sys.config"},
|
|
|
|
{apps, [
|
|
|
|
dmt
|
|
|
|
]}
|
2024-07-24 13:55:59 +00:00
|
|
|
]}.
|
2024-11-01 22:34:09 +00:00
|
|
|
|
|
|
|
% Workaround for outdated plugin. It breaks it.
|
|
|
|
{overrides, [
|
|
|
|
{override, rebar3_elvis_plugin, [
|
|
|
|
{src_dirs, ["unknown"]}
|
|
|
|
]}
|
|
|
|
]}.
|