Total: ~p%
~n", [TotalPerc]), - io:format(F, "Module | Coverage |
---|---|
~p | " - "~p% |
Generated using ~s and erlang.mk on ~s.
~n" - "", [How, Date]), - halt(). -endef - -cover-report: - $(gen_verbose) mkdir -p $(COVER_REPORT_DIR) - $(gen_verbose) $(call erlang,$(cover_report.erl)) - -endif -endif # ifneq ($(COVER_REPORT_DIR),) diff --git a/rebar b/rebar deleted file mode 100755 index 28f3d57..0000000 Binary files a/rebar and /dev/null differ diff --git a/rebar.config b/rebar.config index 9f07a87..5cc8dd4 100644 --- a/rebar.config +++ b/rebar.config @@ -1,10 +1,12 @@ -{sub_dirs,["deps", "examples"]}. -{lib_dirs,["deps", "examples"]}. +%% -*- mode: erlang;erlang-indent-level: 2;indent-tabs-mode: nil -*- +%% ex: ts=4 sw=4 ft=erlang et + +%% == Erlang Compiler == + {erl_opts, [ - {parse_transform, lager_transform}, - {src_dirs, ["src"]}, warn_unused_vars, - warn_export_all, + warnings_as_errors, + ewarn_export_all, warn_shadow_vars, warn_unused_import, warn_unused_function, @@ -17,17 +19,89 @@ warn_exported_vars, warn_missing_spec, warn_untyped_record, - debug_info + debug_info, + {parse_transform, lager_transform} ]}. + +%% == Dependencies == + {deps, [ - {lager, ".*", {git, "https://github.com/basho/lager.git", {tag, "3.2.1"}}}, - {uuid, ".*", {git, "https://github.com/okeuday/uuid.git", {tag, "v1.5.2-rc1"}}}, - {worker_pool, ".*", {git, "https://github.com/inaka/worker_pool.git", {tag, "2.0.1"}}} + {worker_pool, "2.0.1"}, + {lager, "3.2.1"}, + {uuid, "1.5.2-rc1", {pkg, uuid_erl}} ]}. -{xref_warnings, true}. -{xref_checks, [undefined_function_calls, undefined_functions, locals_not_used, deprecated_function_calls, deprecated_functions]}. -{require_min_otp_vsn, "17"}. -%% Common test -{ct_log_dir,"log/ct"}. -{ct_extra_params,"-no_auto_compile -dir ebin -pa deps/*/ebin -smp enable -s sumo_db -erl_args -config test/test.config"}. +%% == Profiles == + +{profiles, [ + {test, [ + {deps, [ + {katana_test, {git, "https://github.com/inaka/katana-test.git", {ref, "b26165d"}}}, + {mixer, "0.1.5", {pkg, inaka_mixer}} + ]} + ]}, + {shell, [ + {deps, [ + {sync, {git, "https://github.com/rustyio/sync.git", {ref, "9c78e7b"}}} + ]} + ]} +]}. + +%% == Common Test == + +{ct_compile_opts, [ + warn_unused_vars, + warn_export_all, + warn_shadow_vars, + warn_unused_import, + warn_unused_function, + warn_bif_clash, + warn_unused_record, + warn_deprecated_function, + warn_obsolete_guard, + strict_validation, + warn_export_vars, + warn_exported_vars, + warn_missing_spec, + warn_untyped_record, + debug_info, + {parse_transform, lager_transform} +]}. + +{ct_opts, [ + {sys_config, ["test/test.config"]} +]}. + +%% == Cover == + +{cover_enabled, true}. + +{cover_opts, [verbose]}. + +%% == EDoc == + +{edoc_opts, [ + {report_missing_types, true}, + {source_path, ["src"]}, + {report_missing_types, true}, + {todo, true}, + {packages, false}, + {subpackages, false} +]}. + +%% == Dialyzer == + +{dialyzer, [ + {warnings, [ + race_conditions, + no_return, + unmatched_returns, + error_handling + ]}, + {plt_apps, top_level_deps}, + {plt_extra_apps, []}, + {plt_location, local}, + {plt_prefix, "sumo_db"}, + {base_plt_location, "."}, + {base_plt_prefix, "sumo_db"} +]}. diff --git a/src/sumo_db.app.src b/src/sumo_db.app.src index 880c5bd..f6b22ec 100644 --- a/src/sumo_db.app.src +++ b/src/sumo_db.app.src @@ -15,11 +15,12 @@ {modules, []}, {mod, {sumo_app, []}}, {env, []}, - {maintainers,["Inaka"]}, - {licenses,["Apache 2.0"]}, - {links,[ {"Github", "https://github.com/inaka/sumo_db"}, - {"Docs", "http://inaka.github.io/sumo_db/"}, - {"Example", "https://github.com/inaka/sumo_db/tree/master/examples/blog"} - ]}, - {build_tools,["erlang.mk", "rebar"]} + {maintainers, ["Inaka"]}, + {licenses, ["Apache 2.0"]}, + {links, [ + {"Github", "https://github.com/inaka/sumo_db"}, + {"Docs", "http://inaka.github.io/sumo_db/"}, + {"Example", "https://github.com/inaka/sumo_db/tree/master/examples/blog"} + ]}, + {build_tools, ["rebar3"]} ]}. diff --git a/test/sumo_basic_SUITE.erl b/test/sumo_basic_SUITE.erl index a38efd7..da3e6bd 100644 --- a/test/sumo_basic_SUITE.erl +++ b/test/sumo_basic_SUITE.erl @@ -45,6 +45,7 @@ init_per_suite(Config) -> ok = sumo_test_utils:start_apps(), [{module, sumo_test_people_mnesia} | Config]. +-spec init_per_testcase(atom(), config()) -> config(). init_per_testcase(_, Config) -> {_, Module} = lists:keyfind(module, 1, Config), sumo_basic_test_helper:init_store(Module),