From f03dbf4d0662a231454f7c188c10e2892c2733ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 21 Jun 2011 17:24:07 +0200 Subject: Use dialyzer directly instead of through rebar Rebar recently removed their dialyzer support options so we're switching to plain dialyzer. And as a bonus it works much better! --- .gitignore | 1 + Makefile | 9 ++++++++- rebar.config | 7 ------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 334e906..d38fc51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.cowboy_dialyzer.plt .eunit ebin logs diff --git a/Makefile b/Makefile index 7678009..04f12d7 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # See LICENSE for licensing information. +DIALYZER = dialyzer REBAR = rebar all: app @@ -20,5 +21,11 @@ eunit: ct: @$(REBAR) ct +build-plt: + @$(DIALYZER) --build_plt --output_plt .cowboy_dialyzer.plt \ + --apps kernel stdlib sasl inets crypto public_key ssl + dialyze: - @$(REBAR) dialyze + @$(DIALYZER) --src src --plt .cowboy_dialyzer.plt \ + -Wbehaviours -Werror_handling \ + -Wrace_conditions -Wunmatched_returns # -Wunderspecs diff --git a/rebar.config b/rebar.config index e700ab8..afdbcc6 100644 --- a/rebar.config +++ b/rebar.config @@ -1,11 +1,4 @@ {cover_enabled, true}. -{dialyzer_opts, [src, {warnings, [ - behaviours, - error_handling, - race_conditions, - unmatched_returns -%% underspecs -]}]}. {erl_opts, [ %% bin_opt_info, warnings_as_errors, -- cgit v1.2.3