aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-09-21 10:09:26 +0200
committerStavros Aronis <[email protected]>2012-09-26 11:04:00 +0200
commitf985ec421d2a9da3186445157f82185c7c4dea72 (patch)
tree501b77a4535117c204554fe9c2c71851e055ecc5 /lib
parentae36dda6c36ecee6888993f0f275d02e149e7484 (diff)
downloadotp-f985ec421d2a9da3186445157f82185c7c4dea72.tar.gz
otp-f985ec421d2a9da3186445157f82185c7c4dea72.tar.bz2
otp-f985ec421d2a9da3186445157f82185c7c4dea72.zip
Respect {plt_check,false} option when using dialyzer:run/1
Diffstat (limited to 'lib')
-rw-r--r--lib/dialyzer/src/dialyzer.erl19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 3e3c12405f..99388438b1 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -162,14 +162,17 @@ run(Opts) ->
{error, Msg} ->
throw({dialyzer_error, Msg});
OptsRecord ->
- case cl_check_init(OptsRecord) of
- {ok, ?RET_NOTHING_SUSPICIOUS} ->
- case dialyzer_cl:start(OptsRecord) of
- {?RET_DISCREPANCIES, Warnings} -> Warnings;
- {?RET_NOTHING_SUSPICIOUS, []} -> []
- end;
- {error, ErrorMsg1} ->
- throw({dialyzer_error, ErrorMsg1})
+ case OptsRecord#options.check_plt of
+ true ->
+ case cl_check_init(OptsRecord) of
+ {ok, ?RET_NOTHING_SUSPICIOUS} -> ok;
+ {error, ErrorMsg1} -> throw({dialyzer_error, ErrorMsg1})
+ end;
+ false -> ok
+ end,
+ case dialyzer_cl:start(OptsRecord) of
+ {?RET_DISCREPANCIES, Warnings} -> Warnings;
+ {?RET_NOTHING_SUSPICIOUS, []} -> []
end
catch
throw:{dialyzer_error, ErrorMsg} ->