diff options
author | Stavros Aronis <[email protected]> | 2011-02-05 13:25:45 +0200 |
---|---|---|
committer | Stavros Aronis <[email protected]> | 2011-02-06 11:46:43 +0200 |
commit | 4b5447031fc8478a8c725b97ee1fb8d55365619a (patch) | |
tree | 3d5d0e9a2107aa0728f60eebb6858fcd5c22e4af /lib/typer/src/typer_options.erl | |
parent | 1937ce923530758629d32dd763300b7e2a2fd707 (diff) | |
download | otp-4b5447031fc8478a8c725b97ee1fb8d55365619a.tar.gz otp-4b5447031fc8478a8c725b97ee1fb8d55365619a.tar.bz2 otp-4b5447031fc8478a8c725b97ee1fb8d55365619a.zip |
Add '--no_spec' option to Typer
When run with '--no_spec', Typer will hide from Dialyzer any specs
present in the files under analysis.
Diffstat (limited to 'lib/typer/src/typer_options.erl')
-rw-r--r-- | lib/typer/src/typer_options.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/typer/src/typer_options.erl b/lib/typer/src/typer_options.erl index f149c937c7..c0f4260f19 100644 --- a/lib/typer/src/typer_options.erl +++ b/lib/typer/src/typer_options.erl @@ -60,6 +60,7 @@ analyze_args(ArgList, Args, Analysis) -> cl(["-h"|_]) -> help_message(); cl(["--help"|_]) -> help_message(); +cl(["--no_spec"|Opts]) -> {no_spec, Opts}; cl(["-v"|_]) -> version_message(); cl(["--version"|_]) -> version_message(); cl(["--comments"|Opts]) -> {comments, Opts}; @@ -131,7 +132,10 @@ analyze_result({inc, Val}, Args, Analysis) -> NewVal = Analysis#typer_analysis.includes ++ [Val], {Args, Analysis#typer_analysis{includes = NewVal}}; analyze_result({plt, Plt}, Args, Analysis) -> - {Args, Analysis#typer_analysis{plt = Plt}}. + {Args, Analysis#typer_analysis{plt = Plt}}; +analyze_result(no_spec, Args, Analysis) -> + {Args, Analysis#typer_analysis{no_spec = true}}. + %%-------------------------------------------------------------------- |