diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-08-18 10:24:25 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-08-18 10:24:25 +0100 |
commit | 31b148634e10d34a3774ee028c4d86d01101b2dc (patch) | |
tree | 3d7859df60a3c7062d5643ce757b11d5068bff0b | |
parent | dbded325f13be936a505e25c5c1110d66b75cbd0 (diff) | |
download | rabbitmq-server-31b148634e10d34a3774ee028c4d86d01101b2dc.tar.gz |
told dialyzer to check for more things
As Matthew suggested, I've added {wranings, [underspecs, behaiviours,
race_conditions]} to dialyzer's options. As a result, we now have 56
warnings instead of just the 4. Most of them are underspecs (i.e. we
say a function returns any() but dialyzer's figured out that's overly
general).
-rw-r--r-- | src/rabbit_dialyzer.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/rabbit_dialyzer.erl b/src/rabbit_dialyzer.erl index 51bd6b1f..e5aa74b7 100644 --- a/src/rabbit_dialyzer.erl +++ b/src/rabbit_dialyzer.erl @@ -67,17 +67,20 @@ add_to_plt(PltPath, FilesString) -> dialyze_files(PltPath, ModifiedFiles) -> Files = string:tokens(ModifiedFiles, " "), DialyzerWarnings = dialyzer:run([{init_plt, PltPath}, - {files, Files}]), + {files, Files}, + {warnings, [underspecs, behaviours, + race_conditions]}]), case DialyzerWarnings of [] -> io:format("~nOk~n"), ok; - _ -> io:format("~nFAILED with the following warnings:~n"), + _ -> io:format("~n~nFAILED with the following ~p warnings:~n~n", + [length(DialyzerWarnings)]), print_warnings(DialyzerWarnings), fail end. print_warnings(Warnings) -> - [io:format("~s", [dialyzer:format_warning(W)]) || W <- Warnings], + [io:format("~s~n", [dialyzer:format_warning(W)]) || W <- Warnings], io:format("~n"), ok. |