aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_options.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-11-14 17:01:59 +0100
committerStavros Aronis <[email protected]>2011-11-18 15:06:46 +0100
commit8167578ca6b23f3043ae2e21ded4b13b8db74e20 (patch)
treeb0dea28568f073b63034cff0d3621f56e20795c7 /lib/dialyzer/src/dialyzer_options.erl
parent8682e6b3db55f7f021e529b2134f223b4cc70ace (diff)
downloadotp-8167578ca6b23f3043ae2e21ded4b13b8db74e20.tar.gz
otp-8167578ca6b23f3043ae2e21ded4b13b8db74e20.tar.bz2
otp-8167578ca6b23f3043ae2e21ded4b13b8db74e20.zip
Wrap up behaviours patch for Dialyzer
Enable warnings by default, add two options for suppressing them, fix warning formatting and update testsuites.
Diffstat (limited to 'lib/dialyzer/src/dialyzer_options.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_options.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/dialyzer/src/dialyzer_options.erl b/lib/dialyzer/src/dialyzer_options.erl
index b2a67de8bd..866650a0b2 100644
--- a/lib/dialyzer/src/dialyzer_options.erl
+++ b/lib/dialyzer/src/dialyzer_options.erl
@@ -49,7 +49,9 @@ build(Opts) ->
?WARN_CALLGRAPH,
?WARN_CONTRACT_RANGE,
?WARN_CONTRACT_TYPES,
- ?WARN_CONTRACT_SYNTAX],
+ ?WARN_CONTRACT_SYNTAX,
+ ?WARN_BEHAVIOUR,
+ ?WARN_UNDEFINED_CALLBACK],
DefaultWarns1 = ordsets:from_list(DefaultWarns),
InitPlt = dialyzer_plt:get_default_plt(),
DefaultOpts = #options{},
@@ -275,14 +277,16 @@ build_warnings([Opt|Opts], Warnings) ->
no_contracts ->
Warnings1 = ordsets:del_element(?WARN_CONTRACT_SYNTAX, Warnings),
ordsets:del_element(?WARN_CONTRACT_TYPES, Warnings1);
+ no_behaviours ->
+ ordsets:del_element(?WARN_BEHAVIOUR, Warnings);
+ no_undefined_callbacks ->
+ ordsets:del_element(?WARN_UNDEFINED_CALLBACK, Warnings);
unmatched_returns ->
ordsets:add_element(?WARN_UNMATCHED_RETURN, Warnings);
error_handling ->
ordsets:add_element(?WARN_RETURN_ONLY_EXIT, Warnings);
race_conditions ->
ordsets:add_element(?WARN_RACE_CONDITION, Warnings);
- behaviours ->
- ordsets:add_element(?WARN_BEHAVIOUR, Warnings);
specdiffs ->
S = ordsets:from_list([?WARN_CONTRACT_SUBTYPE,
?WARN_CONTRACT_SUPERTYPE,