Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dialyzer #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,34 @@ distclean: clean

doc:
@./rebar doc skip_deps=true

COMBO_PLT = $(HOME)/.rhc_dialyzer_plt
APPS = kernel stdlib sasl erts eunit
INCLUDES = -I include -I deps
check_plt: all
dialyzer --check_plt --plt $(COMBO_PLT) --apps $(APPS) deps/*/ebin

build_plt: all
dialyzer --build_plt --output_plt $(COMBO_PLT) --apps $(APPS) deps/*/ebin

dialyzer: all
@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 --verbose -Wno_return --plt $(COMBO_PLT) $(INCLUDES) ebin

typer: $(DEPSOLVER_PLT)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you define this variable? I only see COMBO_PLT.

typer --plt $(COMBO_PLT) $(INCLUDES) -r src

plt_info:
dialyzer --plt $(COMBO_PLT) --plt_info

cleanplt:
@echo
@echo "Are you sure? It takes time to re-build."
@echo Deleting $(COMBO_PLT) in 5 seconds.
@echo
@sleep 5
rm $(COMBO_PLT)
3 changes: 2 additions & 1 deletion include/rhc.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
%%
%% -------------------------------------------------------------------

-define(DEFAULT_TIMEOUT, 60000).
-define(DEFAULT_HTTP_TIMEOUT, 60000).

-record(rhc, {ip,
port,
prefix,
options}).

7 changes: 6 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{erl_opts, []}.
{erl_opts, [debug_info,
warn_obsolete_guard,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warnings_as_errors would be simpler here and is convention in other Basho repos.

warn_unused_import,
warn_shadow_vars,
warn_export_vars,
warn_export_all]}.

{deps,
[
Expand Down
Loading