~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/dialyzer/src/dialyzer_cl_parse.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%% -*- erlang-indent-level: 2 -*-
2
2
%%-----------------------------------------------------------------------
3
3
%% %CopyrightBegin%
4
 
%% 
5
 
%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
6
 
%% 
 
4
%%
 
5
%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
 
6
%%
7
7
%% The contents of this file are subject to the Erlang Public License,
8
8
%% Version 1.1, (the "License"); you may not use this file except in
9
9
%% compliance with the License. You should have received a copy of the
10
10
%% Erlang Public License along with this software. If not, it can be
11
11
%% retrieved online at http://www.erlang.org/.
12
 
%% 
 
12
%%
13
13
%% Software distributed under the License is distributed on an "AS IS"
14
14
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
15
%% the License for the specific language governing rights and limitations
16
16
%% under the License.
17
 
%% 
 
17
%%
18
18
%% %CopyrightEnd%
19
19
%%
20
20
 
68
68
cl(["--no_check_plt"|T]) ->
69
69
  put(dialyzer_options_check_plt, false),
70
70
  cl(T);
 
71
cl(["-nn"|T]) ->
 
72
  cl(["--no_native"|T]);
 
73
cl(["--no_native"|T]) ->
 
74
  put(dialyzer_options_native, false),
 
75
  cl(T);
71
76
cl(["--plt_info"|T]) ->
72
77
  put(dialyzer_options_analysis_type, plt_info),
73
78
  cl(T);
181
186
      NewTail = command_line(L),
182
187
      cl(NewTail);
183
188
    false ->
184
 
      error("Unknown option: "++H)
 
189
      error("Unknown option: " ++ H)
185
190
  end;
186
191
cl([]) ->
187
192
  {RetTag, Opts} =
191
196
        {plt_info, cl_options()};
192
197
      false ->
193
198
        case get(dialyzer_options_mode) of
194
 
          {gui,_} = GUI -> {GUI, common_options()};
 
199
          {gui, _} = GUI -> {GUI, common_options()};
195
200
          cl ->
196
201
            case get(dialyzer_options_analysis_type) =:= plt_check of
197
202
              true  -> {check_init, cl_options()};
311
316
  S = "Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
312
317
                [-pa dir]* [--plt plt] [-Ddefine]* [-I include_dir]* 
313
318
                [--output_plt file] [-Wwarn]* [--src] [--gui | --wx]
314
 
                [-c applications] [-r applications] [-o outfile]
 
319
                [files_or_dirs] [-r dirs] [--apps applications] [-o outfile]
315
320
                [--build_plt] [--add_to_plt] [--remove_from_plt]
316
 
                [--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
317
 
Options: 
318
 
  -c applications (or --command-line applications)
319
 
      Use Dialyzer from the command line (no GUI) to detect defects in the
320
 
      specified applications (directories or .erl or .beam files)
321
 
  -r applications
322
 
      Same as -c only that directories are searched recursively for 
323
 
      subdirectories containing .erl or .beam files (depending on the 
324
 
      type of analysis)
 
321
                [--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
 
322
                [--no_native]
 
323
Options:
 
324
  files_or_dirs (for backwards compatibility also as: -c files_or_dirs)
 
325
      Use Dialyzer from the command line to detect defects in the
 
326
      specified files or directories containing .erl or .beam files,
 
327
      depending on the type of the analysis
 
328
  -r dirs
 
329
      Same as the previous but the specified directories are searched
 
330
      recursively for subdirectories containing .erl or .beam files in
 
331
      them, depending on the type of analysis
 
332
  --apps applications
 
333
      Option typically used when building or modifying a PLT as in:
 
334
        dialyzer --build_plt --apps erts kernel stdlib mnesia ...
 
335
      to conveniently refer to library applications corresponding to the
 
336
      Erlang/OTP installation. However, the option is general and can also
 
337
      be used during analysis in order to refer to Erlang/OTP applications.
 
338
      In addition, file or directory names can also be included, as in:
 
339
        dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam
325
340
  -o outfile (or --output outfile)
326
341
      When using Dialyzer from the command line, send the analysis
327
342
      results to the specified \"outfile\" rather than to stdout
389
404
      by the file name extension. Supported extensions are: raw, dot, and ps.
390
405
      If something else is used as file name extension, default format '.raw'
391
406
      will be used.
 
407
  --no_native (or -nn)
 
408
      Bypass the native code compilation of some key files that dialyzer
 
409
      heuristically performs when dialyzing many files; this avoids the
 
410
      compilation time but it may result in (much) longer analysis time.
392
411
  --gui
393
412
      Use the gs-based GUI.
394
413
  --wx
432
451
     Include warnings for functions that only return by means of an exception.
433
452
  -Wrace_conditions ***
434
453
     Include warnings for possible race conditions.
 
454
  -Wbehaviours ***
 
455
     Include warnings about behaviour callbacks which drift from the published
 
456
     recommended interfaces.
435
457
  -Wunderspecs ***
436
458
     Warn about underspecified functions 
437
459
     (those whose -spec is strictly more allowing than the success typing).