Skip to content

Commit

Permalink
Merge pull request #238 from inaka/harenson.237.update-repo-and-make-…
Browse files Browse the repository at this point in the history
…it-ready-for-hex.pm

[Fix #237] Update dependencies; Update erlang.mk; Set elvis to use rulesets; Remove xref.config
  • Loading branch information
Brujo Benavides committed Mar 21, 2016
2 parents 002d25f + 64162b0 commit 01db604
Show file tree
Hide file tree
Showing 7 changed files with 355 additions and 302 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ log*/
erl_crash.dump
.erlang.mk.*
.erlang.mk/
sumo_db.d
sumo_db.d
_build/
rebar.lock
34 changes: 10 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@ PROJECT = sumo_db
CONFIG ?= test/test.config

DEPS = lager uuid worker_pool
TEST_DEPS = katana_test mixer
SHELL_DEPS = sync
BUILD_DEPS = inaka_mk hexer_mk
DEP_PLUGINS = inaka_mk hexer_mk

dep_sync = git https://github.com/rustyio/sync.git 9c78e7b
dep_lager = git https://github.com/basho/lager.git 3.0.1
dep_sync = git https://github.com/rustyio/sync.git 11df81d
dep_lager = git https://github.com/basho/lager.git 3.1.0
dep_worker_pool = git https://github.com/inaka/worker_pool.git 1.0.4
dep_uuid = git https://github.com/okeuday/uuid.git 31f408f4ef

TEST_DEPS = katana_test mixer
dep_katana_test = git https://github.com/inaka/katana-test.git 5491fba
dep_mixer = git git://github.com/inaka/mixer.git 0.1.5
dep_uuid = git https://github.com/okeuday/uuid.git v1.5.1
dep_inaka_mk = git https://github.com/inaka/inaka.mk 1.0.0
dep_hexer_mk = git https://github.com/inaka/hexer.mk 1.1.0
dep_katana_test = git https://github.com/inaka/katana-test.git 0.0.4
dep_mixer = git https://github.com/inaka/mixer.git 0.1.5

CT_SUITES ?= conditional_logic sumo_basic sumo_events sumo_meta

include erlang.mk

LOCAL_DEPS := tools common_test crypto test_server mnesia
DIALYZER_DIRS := ebin/
DIALYZER_OPTS := --verbose --statistics -Wunmatched_returns

ERLC_OPTS := +'{parse_transform, lager_transform}'
ERLC_OPTS += +warn_unused_vars +warn_export_all +warn_shadow_vars +warn_unused_import +warn_unused_function
Expand All @@ -46,18 +47,3 @@ changelog:
github_changelog_generator --token ${TOKEN}

EDOC_OPTS += todo, report_missing_types

quicktests: app
@$(MAKE) --no-print-directory app-build test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
$(verbose) mkdir -p $(CURDIR)/logs/
$(gen_verbose) $(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)

test-build-plt: ERLC_OPTS=$(TEST_ERLC_OPTS)
test-build-plt:
@$(MAKE) --no-print-directory test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
$(gen_verbose) touch ebin/test

plt-all: PLT_APPS := $(ALL_TEST_DEPS_DIRS)
plt-all: test-deps test-build-plt plt

dialyze-all: app test-build-plt dialyze
29 changes: 6 additions & 23 deletions elvis.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,21 @@
{config,
[#{dirs => ["src/*", "test"],
filter => "*.erl",
rules => [{elvis_style, line_length, #{limit => 80}},
{elvis_style, no_tabs},
{elvis_style, macro_names},
{elvis_style, macro_module_names},
{elvis_style, operator_spaces, #{rules => [{right, ","},
{right, "++"},
{left, "++"}]}},
{elvis_style, nesting_level, #{level => 3}},
{elvis_style, god_modules, #{limit => 25}},
{elvis_style, no_if_expression},
{elvis_style, used_ignored_variable},
{elvis_style, no_behavior_info},
{
elvis_style,
module_naming_convention,
#{regex => "^([a-z][a-z0-9]*_?)*(_SUITE)?$", ignore => []}
},
{elvis_style, state_record_and_type},
{elvis_style, no_spec_with_records}
]
rules => [{elvis_style, dont_repeat_yourself, disable},
{elvis_style, invalid_dynamic_call, disable}],
ruleset => erl_files
},
#{dirs => ["."],
filter => "Makefile",
rules => [{elvis_project, no_deps_master_erlang_mk, #{ignore => []}}]
ruleset => makefiles
},
#{dirs => ["."],
filter => "rebar.config",
rules => [{elvis_project, no_deps_master_rebar, #{ignore => []}}]
ruleset => rebar_config
},
#{dirs => ["."],
filter => "elvis.config",
rules => [{elvis_project, old_configuration_format}]
ruleset => elvis_config
}
]
}
Expand Down
Loading

0 comments on commit 01db604

Please sign in to comment.