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 | 7151d480b80314578663e0c3e731130c1c541042 (patch) | |
| tree | 3d7859df60a3c7062d5643ce757b11d5068bff0b | |
| parent | 29a4762324299261b0764aa1e83f6401419fa50d (diff) | |
| download | rabbitmq-server-git-7151d480b80314578663e0c3e731130c1c541042.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 51bd6b1f93..e5aa74b7f2 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. |
