Permalink
Browse files

change dialyzer Makefile targets to handle known warnings

At the suggestion of Tuncer Ayaz, modify the dialyzer targets to use the
new known_dialyzer_warnings file to ignore all known dialyzer warnings.
  • Loading branch information...
1 parent 705cd0a commit cbed101742a66ae74373d33c865b9422597017b2 @vinoski vinoski committed Apr 24, 2012
Showing with 20 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +3 −2 Makefile
  3. +16 −0 known_dialyzer_warnings
View
@@ -68,3 +68,4 @@ ebin/yaws.appup
etc
yaws_logs
rel/yaws
+dialyzer_warnings
View
@@ -79,7 +79,7 @@ touch:
find . -name '*.erl' -print | xargs touch -m
yaws.plt:
- dialyzer --build_plt -r . --output_plt yaws.plt \
+ dialyzer --build_plt -r ebin src --output_plt yaws.plt \
-r $(ERLDIR)/lib/sasl-$(SASL_VSN) \
-r $(ERLDIR)/lib/kernel-$(KERNEL_VSN) \
-r $(ERLDIR)/lib/stdlib-$(STDLIB_VSN) \
@@ -89,7 +89,8 @@ yaws.plt:
# -r $(ERLDIR)/lib/ssl-$(SSL_VSN)
dialyzer: yaws.plt
- dialyzer --plt yaws.plt -r .
+ -dialyzer -q --plt yaws.plt -r ebin src > dialyzer_warnings
+ diff -U0 known_dialyzer_warnings dialyzer_warnings
.PHONY: test
test:
@@ -0,0 +1,16 @@
+
+yaws.erl:1858: The pattern 'false' can never match the type 'true'
+yaws.erl:2366: Guard test Ret::'file' == 'fd' can never succeed
+yaws.erl:2374: Guard test Ret::'file' == 'binfd' can never succeed
+yaws_api.erl:470: The pattern <Data, ParseState = {'mp_parse_state', 'start_header', _, _, _, _}, Acc, [], []> can never match the type <_,#mp_parse_state{state::'header'},_,[any()],[{atom() | [any()],[any()]}]>
+yaws_config.erl:464: The pattern 'false' can never match the type 'true'
+yaws_ctl.erl:530: Function hup/1 has no local return
+yaws_ctl.erl:535: Function stop/1 has no local return
+yaws_ctl.erl:539: Function status/1 has no local return
+yaws_ctl.erl:542: Function load/1 has no local return
+yaws_ctl.erl:564: Function trace/1 has no local return
+yaws_ctl.erl:567: Function debug_dump/1 has no local return
+yaws_ctl.erl:570: Function stats/1 has no local return
+yaws_ctl.erl:572: Function running_config/1 has no local return
+yaws_revproxy.erl:523: The pattern 'true' can never match the type 'false'
+yaws_sup_restarts.erl:49: The pattern 'false' can never match the type 'true'

0 comments on commit cbed101

Please sign in to comment.