Просмотр исходного кода

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!
Loïc Hoguin 14 лет назад
Родитель
Сommit
f03dbf4d06
3 измененных файлов с 9 добавлено и 8 удалено
  1. 1 0
      .gitignore
  2. 8 1
      Makefile
  3. 0 7
      rebar.config

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
+.cowboy_dialyzer.plt
 .eunit
 ebin
 logs

+ 8 - 1
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

+ 0 - 7
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,