From 4b5447031fc8478a8c725b97ee1fb8d55365619a Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Sat, 5 Feb 2011 13:25:45 +0200 Subject: Add '--no_spec' option to Typer When run with '--no_spec', Typer will hide from Dialyzer any specs present in the files under analysis. --- lib/typer/src/typer_info.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/typer/src/typer_info.erl') diff --git a/lib/typer/src/typer_info.erl b/lib/typer/src/typer_info.erl index 7fc1ba8ad0..df0b4448f3 100644 --- a/lib/typer/src/typer_info.erl +++ b/lib/typer/src/typer_info.erl @@ -108,7 +108,11 @@ analyze_core_tree(Core, Records, SpecInfo, ExpTypes, Analysis, File) -> CS2 = dialyzer_codeserver:insert(Module, Tree, CS1), CS3 = dialyzer_codeserver:set_next_core_label(NewLabel, CS2), CS4 = dialyzer_codeserver:store_temp_records(Module, Records, CS3), - CS5 = dialyzer_codeserver:store_temp_contracts(Module, SpecInfo, CS4), + CS5 = + case Analysis#typer_analysis.no_spec of + true -> CS4; + false -> dialyzer_codeserver:store_temp_contracts(Module, SpecInfo, CS4) + end, OldExpTypes = dialyzer_codeserver:get_temp_exported_types(CS5), MergedExpTypes = sets:union(ExpTypes, OldExpTypes), CS6 = dialyzer_codeserver:insert_temp_exported_types(MergedExpTypes, CS5), -- cgit v1.2.3