-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
568 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ erl_crash.dump | |
*.beam | ||
rel/*.tar.bz2 | ||
gproc_dist_* | ||
_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,13 @@ | ||
REBAR = $(shell pwd)/rebar | ||
REBAR = rebar3 | ||
|
||
.PHONY: deps rel package | ||
.PHONY: all test tree | ||
|
||
all: deps compile | ||
all: compile | ||
|
||
compile: | ||
$(REBAR) compile | ||
|
||
deps: | ||
$(REBAR) get-deps | ||
include fifo.mk | ||
|
||
clean: | ||
$(REBAR) clean | ||
|
||
distclean: clean | ||
$(REBAR) delete-deps | ||
|
||
test: all | ||
$(REBAR) skip_deps=true eunit | ||
|
||
### | ||
### Docs | ||
### | ||
docs: | ||
$(REBAR) skip_deps=true doc | ||
|
||
## | ||
## Developer targets | ||
## | ||
|
||
console: | ||
erl -pa ebin deps/*/ebin -s libchunter | ||
xref: | ||
$(REBAR) xref skip_deps=true | ||
|
||
|
||
## | ||
## Dialyzer | ||
## | ||
APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto inets \ | ||
xmerl webtool snmp public_key mnesia eunit syntax_tools compiler | ||
COMBO_PLT = $(HOME)/.libchunter_combo_dialyzer_plt | ||
|
||
|
||
check_plt: deps compile | ||
dialyzer --check_plt --plt $(COMBO_PLT) --apps $(APPS) \ | ||
deps/*/ebin ebin | ||
|
||
build_plt: deps compile | ||
dialyzer --build_plt --output_plt $(COMBO_PLT) --apps $(APPS) \ | ||
deps/*/ebin ebin | ||
|
||
dialyzer: deps compile | ||
@echo | ||
@echo Use "'make check_plt'" to check PLT prior to using this target. | ||
@echo Use "'make build_plt'" to build PLT prior to using this target. | ||
@echo | ||
@sleep 1 | ||
dialyzer -Wno_return --plt $(COMBO_PLT) deps/*/ebin ebin | grep -v -f dialyzer.mittigate | ||
|
||
|
||
cleanplt: | ||
@echo | ||
@echo "Are you sure? It takes about 1/2 hour to re-build." | ||
@echo Deleting $(COMBO_PLT) in 5 seconds. | ||
@echo | ||
sleep 5 | ||
rm $(COMBO_PLT) | ||
eunit: | ||
$(REBAR) eunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[ | ||
{elvis, | ||
[{config, | ||
[#{dirs => ["src"], | ||
filter => "*.erl", | ||
rules => [{elvis_style, line_length, | ||
#{ignore => [], | ||
limit => 80, | ||
skip_comments => false}}, | ||
{elvis_style, no_tabs}, | ||
{elvis_style, no_trailing_whitespace}, | ||
{elvis_style, macro_names, #{ignore => []}}, | ||
{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, ignore => [libchunter]}}, | ||
{elvis_style, no_if_expression}, | ||
{elvis_style, invalid_dynamic_call, | ||
#{ignore => []}}, | ||
{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, | ||
function_naming_convention, | ||
#{regex => "^([a-z][a-z0-9]*_?)*$"} | ||
}, | ||
{elvis_style, state_record_and_type}, | ||
{elvis_style, no_spec_with_records}, | ||
{elvis_style, dont_repeat_yourself, #{min_complexity => 12}}, | ||
{elvis_style, no_debug_call, | ||
#{ignore => []}} | ||
] | ||
}, | ||
#{dirs => ["."], | ||
filter => "Makefile", | ||
rules => [{elvis_project, no_deps_master_erlang_mk, #{ignore => []}}, | ||
{elvis_project, protocol_for_deps_erlang_mk, #{ignore => []}}] | ||
}, | ||
#{dirs => ["."], | ||
filter => "rebar.config", | ||
%% on the test branch master deps are OK | ||
rules => [%{elvis_project, no_deps_master_rebar, #{ignore => []}}, | ||
{elvis_project, protocol_for_deps_rebar, #{ignore => []}}] | ||
}, | ||
#{dirs => ["."], | ||
filter => "elvis.config", | ||
rules => [{elvis_project, old_configuration_format}] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
REBAR = $(shell pwd)/rebar3 | ||
|
||
compile: $(REBAR) .git/hooks/pre-commit | ||
$(REBAR) compile | ||
|
||
.git/hooks/pre-commit: hooks/pre-commit | ||
cp hooks/pre-commit .git/hooks | ||
|
||
pre-commit: lint xref dialyzer test | ||
|
||
dialyzer: $(REBAR) | ||
$(REBAR) dialyzer | ||
|
||
xref: $(REBAR) | ||
$(REBAR) xref | ||
|
||
test: $(REBAR) | ||
$(REBAR) eunit | ||
|
||
lint: $(REBAR) | ||
$(REBAR) as lint lint | ||
|
||
$(REBAR): | ||
cp `which rebar3` $(REBAR) | ||
|
||
upgrade: $(REBAR) | ||
$(REBAR) upgrade | ||
make tree | ||
|
||
tree: $(REBAR) | ||
$(REBAR) tree | grep -v '=' | sed 's/ (.*//' > tree | ||
|
||
### | ||
### Docs | ||
### | ||
docs: | ||
$(REBAR) edoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify what is about to be committed. | ||
# Called by "git commit" with no arguments. The hook should | ||
# exit with non-zero status after issuing an appropriate message if | ||
# it wants to stop the commit. | ||
# | ||
# To enable this hook, rename this file to "pre-commit". | ||
|
||
if [[ "x${SKIP}x" == "x1x" ]] | ||
then | ||
exit 0 | ||
fi | ||
|
||
make pre-commit | ||
RETVAL=$? | ||
if [ $RETVAL -ne 0 ] | ||
then | ||
echo "checks failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
{lib_dirs, ["deps"]}. | ||
{erl_opts, [{i, "../alog/include"}, {i, ".."}, {i,"deps"}, debug_info, {parse_transform, lager_transform}]}. | ||
{erl_opts, [debug_info, {parse_transform, lager_transform}]}. | ||
{deps, | ||
[ | ||
{fifo_spec, ".*", {git, "https://github.com/project-fifo/fifo_spec.git", {tag, "0.1.1"}}}, | ||
{lager, ".*", {git, "git://github.com/basho/lager.git", {tag, "1.2.2"}}} | ||
{fifo_spec, "~>0.1.27"}, | ||
{lager, "~>2.1.1"} | ||
]}. | ||
|
||
{profiles, | ||
[ | ||
{lint, [{plugins, [{rebar3_lint, {git, "https://github.com/project-fifo/rebar3_lint.git", {tag, "0.1.4"}}}]}]} | ||
]}. | ||
|
||
{xref_checks, [undefined_function_calls, | ||
undefined_functions, | ||
locals_not_used, | ||
deprecated_function_calls, deprecated_functions]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[{<<"fifo_dt">>,{pkg,<<"fifo_dt">>,<<"0.1.66">>},1}, | ||
{<<"fifo_spec">>,{pkg,<<"fifo_spec">>,<<"0.1.27">>},0}, | ||
{<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.20">>},2}, | ||
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.7">>},1}, | ||
{<<"jsx">>,{pkg,<<"jsx">>,<<"1.4.5">>},2}, | ||
{<<"jsxd">>,{pkg,<<"jsxd">>,<<"0.1.10">>},2}, | ||
{<<"lager">>,{pkg,<<"lager">>,<<"2.1.1">>},0}, | ||
{<<"libsnarlmatch">>,{pkg,<<"libsnarlmatch">>,<<"0.1.7">>},2}, | ||
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.5.1">>},4}, | ||
{<<"riak_dt">>,{pkg,<<"riak_dt">>,<<"2.1.1">>},2}, | ||
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.5.1">>},3}]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
{application, libchunter, | ||
[ | ||
{description, "Chunter interface library."}, | ||
{vsn, "0.1.8"}, | ||
{registered, []}, | ||
{applications, [ | ||
kernel, | ||
stdlib, | ||
lager | ||
]}, | ||
{mod, { libchunter_app, []}}, | ||
{env, []} | ||
]}. | ||
{application,libchunter, | ||
[{description,"Chunter interface library."}, | ||
{vsn,"0.1.46"}, | ||
{registered,[]}, | ||
{applications,[kernel,stdlib,lager]}, | ||
{mod,{libchunter_app,[]}}, | ||
{env,[]}, | ||
{maintainers,["Heinz N. Gies"]}, | ||
{licenses,["CDDL"]}, | ||
{links,[{"Github", | ||
"https://github.com/project-fifo/libchunter"}]}]}. |
Oops, something went wrong.