mirror of
https://github.com/valitydev/scoper.git
synced 2024-11-06 01:25:23 +00:00
41a14a5586
* Revives CI * Adds disregard of optional dependency during xref check * Allows to pass meta to span on scope creation * Updates woody handler test
116 lines
2.6 KiB
Erlang
116 lines
2.6 KiB
Erlang
%% 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"}}},
|
|
{opentelemetry_api, "1.2.1"}
|
|
]}.
|
|
|
|
%% XRef checks
|
|
{xref_checks, [
|
|
undefined_function_calls,
|
|
% NOTE
|
|
% Tell xref not to bark on functions in optional dependencies.
|
|
% undefined_functions,
|
|
deprecated_functions_calls,
|
|
deprecated_functions
|
|
]}.
|
|
% at will
|
|
% {xref_warnings, true}.
|
|
|
|
%% Dialyzer static analyzing
|
|
{dialyzer, [
|
|
{warnings, [
|
|
% mandatory
|
|
unmatched_returns,
|
|
error_handling,
|
|
race_conditions,
|
|
unknown
|
|
]},
|
|
{plt_apps, all_deps}
|
|
]}.
|
|
|
|
{profiles, [
|
|
{test, [
|
|
{cover_enabled, true},
|
|
{plugins, [
|
|
{rebar3_thrift_compiler, {git, "https://github.com/valitydev/rebar3_thrift_compiler.git", {tag, "0.3.1"}}}
|
|
]},
|
|
{thrift_compiler_opts, [
|
|
{in_dir, "test"},
|
|
{in_files, ["test.thrift"]},
|
|
{out_erl_dir, "test"},
|
|
{out_hrl_dir, "test"},
|
|
{gen, "erlang:app_prefix=scp"}
|
|
]},
|
|
{provider_hooks, [
|
|
{pre, [
|
|
{compile, {thrift, compile}},
|
|
{clean, {thrift, clean}}
|
|
]}
|
|
]},
|
|
{deps, [
|
|
{lager, "3.9.2"},
|
|
{genlib, {git, "https://github.com/valitydev/genlib.git", {branch, "master"}}},
|
|
{woody, {git, "https://github.com/valitydev/woody_erlang.git", {branch, "master"}}},
|
|
{opentelemetry, "1.3.0"}
|
|
]},
|
|
{dialyzer, [
|
|
{plt_extra_apps, [
|
|
lager,
|
|
woody,
|
|
genlib,
|
|
snowflake,
|
|
common_test,
|
|
public_key,
|
|
opentelemetry
|
|
]}
|
|
]}
|
|
]}
|
|
]}.
|
|
|
|
{plugins, [
|
|
{rebar3_lint, "1.0.1"},
|
|
{erlfmt, "1.0.0"},
|
|
{covertool, "2.0.4"}
|
|
]}.
|
|
|
|
%% Linter config.
|
|
{elvis_output_format, colors}.
|
|
|
|
{erlfmt, [
|
|
{print_width, 120},
|
|
{files, ["{src,include,test}/*.{hrl,erl}", "rebar.config", "elvis.config"]}
|
|
]}.
|
|
|
|
{covertool, [
|
|
{coverdata_files, [
|
|
"eunit.coverdata",
|
|
"ct.coverdata"
|
|
]}
|
|
]}.
|