diff options
author | Björn-Egil Dahlberg <[email protected]> | 2010-12-02 12:24:18 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2010-12-02 12:24:26 +0100 |
commit | 4c24c029fbd5263e3dc0ce0d4a23574a05c9bbc3 (patch) | |
tree | 7bef76c162b15eb26447236f1fc323fe3b0a39dc /lib/dialyzer/src/dialyzer_gui.erl | |
parent | 13338198802371d70ca40686d2998861b45edcc4 (diff) | |
parent | f1d81c87d832c805a90a8dceca247cecaad803ab (diff) | |
download | otp-4c24c029fbd5263e3dc0ce0d4a23574a05c9bbc3.tar.gz otp-4c24c029fbd5263e3dc0ce0d4a23574a05c9bbc3.tar.bz2 otp-4c24c029fbd5263e3dc0ce0d4a23574a05c9bbc3.zip |
Merge branch 'ks/dialyzer/support-multiple-plts' into dev
* ks/dialyzer/support-multiple-plts:
dialyzer: Add support for multiple PLTs
OTP-8962
Diffstat (limited to 'lib/dialyzer/src/dialyzer_gui.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_gui.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/dialyzer/src/dialyzer_gui.erl b/lib/dialyzer/src/dialyzer_gui.erl index f353638cdf..4436330f7f 100644 --- a/lib/dialyzer/src/dialyzer_gui.erl +++ b/lib/dialyzer/src/dialyzer_gui.erl @@ -88,8 +88,8 @@ -spec start(#options{}) -> ?RET_NOTHING_SUSPICIOUS. -start(DialyzerOptions = #options{from = From, init_plt = InitPltFile, - legal_warnings = LegalWarnings}) -> +start(#options{from = From, init_plts = InitPltFiles, + legal_warnings = LegalWarnings} = DialyzerOptions) -> process_flag(trap_exit, true), GS = gs:start(), @@ -336,9 +336,13 @@ start(DialyzerOptions = #options{from = From, init_plt = InitPltFile, gs:config(Packer, WH), {ok, CWD} = file:get_cwd(), - InitPlt = try dialyzer_plt:from_file(InitPltFile) - catch throw:{dialyzer_error, _} -> dialyzer_plt:new() - end, + InitPlt = + case InitPltFiles of + [] -> dialyzer_plt:new(); + _ -> + Plts = [dialyzer_plt:from_file(F) || F <- InitPltFiles], + dialyzer_plt:merge_plts_or_report_conflicts(InitPltFiles, Plts) + end, State = #gui_state{add_all = AddAll, add_file = AddFile, |