127
125
Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
128
[-pa dir]* [--plt plt] [-Ddefine]* [-I include_dir]*
129
[--output_plt file] [-Wwarn]* [--src]
130
[-c applications] [-r applications] [-o outfile]
131
[--build_plt] [--add_to_plt] [--remove_from_plt] [--check_plt]
132
[--plt_info] [--get_warnings]
126
[-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
127
[-I include_dir]* [--output_plt file] [-Wwarn]*
128
[--src] [--gui | --wx] [files_or_dirs] [-r dirs]
129
[--apps applications] [-o outfile]
130
[--build_plt] [--add_to_plt] [--remove_from_plt]
131
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
132
[--no_native] [--fullpath]
135
-c applications (or --command-line applications)
136
Use Dialyzer from the command line (no GUI) to detect defects in the
137
specified applications (directories or .erl or .beam files)
139
Same as -c only that directories are searched recursively for
140
subdirectories containing .erl or .beam files (depending on the
135
files_or_dirs (for backwards compatibility also as: -c files_or_dirs)
136
Use Dialyzer from the command line to detect defects in the
137
specified files or directories containing .erl or .beam files,
138
depending on the type of the analysis.
140
Same as the previous but the specified directories are searched
141
recursively for subdirectories containing .erl or .beam files in
142
them, depending on the type of analysis.
144
Option typically used when building or modifying a plt as in:
145
dialyzer --build_plt --apps erts kernel stdlib mnesia ...
146
to conveniently refer to library applications corresponding to the
147
Erlang/OTP installation. However, the option is general and can also
148
be used during analysis in order to refer to Erlang/OTP applications.
149
In addition, file or directory names can also be included, as in:
150
dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam
142
151
-o outfile (or --output outfile)
143
152
When using Dialyzer from the command line, send the analysis
144
results in the specified \"outfile\" rather than in stdout
153
results to the specified outfile rather than to stdout.
146
155
When using Dialyzer from the command line, output the raw analysis
147
156
results (Erlang terms) instead of the formatted result.
148
157
The raw format is easier to post-process (for instance, to filter
149
warnings or to output HTML pages)
158
warnings or to output HTML pages).
151
Override the default, which is to analyze BEAM bytecode, and
152
analyze starting from Erlang source code instead
160
Override the default, which is to analyze BEAM files, and
161
analyze starting from Erlang source code instead.
153
162
-Dname (or -Dname=value)
154
When analyzing from source, pass the define to Dialyzer (**)
163
When analyzing from source, pass the define to Dialyzer. (**)
156
When analyzing from source, pass the include_dir to Dialyzer (**)
165
When analyzing from source, pass the include_dir to Dialyzer. (**)
167
Include dir in the path for Erlang (useful when analyzing files
168
that have '-include_lib()' directives).
157
169
--output_plt file
158
Store the plt at the specified file after building it
170
Store the plt at the specified file after building it.
160
172
Use the specified plt as the initial plt (if the plt was built
161
during setup the files will be checked for consistency)
163
Include dir in the path for Erlang (useful when analyzing files
164
that have '-include_lib()' directives)
173
during setup the files will be checked for consistency).
175
Merge the specified plts to create the initial plt -- requires
176
that the plts are disjoint (i.e., do not have any module
177
appearing in more than one plt).
178
The plts are created in the usual way:
179
dialyzer --build_plt --output_plt plt_1 files_to_include
181
dialyzer --build_plt --output_plt plt_n files_to_include
182
and then can be used in either of the following ways:
183
dialyzer files_to_analyze --plts plt_1 ... plt_n
185
dialyzer --plts plt_1 ... plt_n -- files_to_analyze
186
(Note the -- delimiter in the second case)
166
188
A family of options which selectively turn on/off warnings
167
(for help on the names of warnings use dialyzer -Whelp)
189
(for help on the names of warnings use dialyzer -Whelp).
169
Do not disable the Erlang shell while running the GUI
191
Do not disable the Erlang shell while running the GUI.
170
192
--version (or -v)
171
Prints the Dialyzer version and some more information and exits
193
Print the Dialyzer version and some more information and exit.
173
Prints this message and exits
195
Print this message and exit.
175
Makes Dialyzer a bit more quiet
197
Make Dialyzer a bit more quiet.
177
Makes Dialyzer a bit more verbose
199
Make Dialyzer a bit more verbose.
179
201
The analysis starts from an empty plt and creates a new one from the
180
202
files specified with -c and -r. Only works for beam files.
181
203
Use --plt or --output_plt to override the default plt location.
183
205
The plt is extended to also include the files specified with -c and -r.
184
Use --plt to specify wich plt to start from, and --output_plt to
206
Use --plt to specify which plt to start from, and --output_plt to
185
207
specify where to put the plt. Note that the analysis might include
186
208
files from the plt if they depend on the new files.
187
209
This option only works with beam files.
190
212
from the plt. Note that this may cause a re-analysis of the remaining
193
Checks the plt for consistency and rebuilds it if it is not up-to-date.
215
Check the plt for consistency and rebuild it if it is not up-to-date.
195
217
Skip the plt check when running Dialyzer. Useful when working with
196
218
installed plts that never change.
198
Makes Dialyzer print information about the plt and then quit. The plt
199
can be specified with --plt.
220
Make Dialyzer print information about the plt and then quit. The plt
221
can be specified with --plt(s).
201
Makes Dialyzer emit warnings even when manipulating the plt. Only
202
emits warnings for files that are actually analyzed.
223
Make Dialyzer emit warnings even when manipulating the plt. Warnings
224
are only emitted for files that are actually analyzed.
225
--dump_callgraph file
226
Dump the call graph into the specified file whose format is determined
227
by the file name extension. Supported extensions are: raw, dot, and ps.
228
If something else is used as file name extension, default format '.raw'
231
Bypass the native code compilation of some key files that Dialyzer
232
heuristically performs when dialyzing many files; this avoids the
233
compilation time but it may result in (much) longer analysis time.
235
Display the full path names of files for which warnings are emitted.
237
Use the gs-based GUI.
239
Use the wx-based GUI.
205
242
* denotes that multiple occurrences of these options are possible.
213
250
Suppress warnings for unused functions.
214
251
-Wno_improper_lists
215
252
Suppress warnings for construction of improper lists.
254
Suppress warnings for using tuples instead of funs.
217
256
Suppress warnings for fun applications that will fail.
219
258
Suppress warnings for patterns that are unused or cannot match.
260
Suppress warnings for violations of opaqueness of data types.
220
261
-Wunmatched_returns ***
221
Include warnings for function calls which ignore the return value(s).
262
Include warnings for function calls which ignore a structured return
263
value or do not match against one of many possible return value(s).
222
264
-Werror_handling ***
223
265
Include warnings for functions that only return by means of an exception.
266
-Wrace_conditions ***
267
Include warnings for possible race conditions.
269
Include warnings about behaviour callbacks which drift from the published
270
recommended interfaces.
225
272
Warn about underspecified functions
226
(the -spec is strictly more allowing than the success typing)
273
(those whose -spec is strictly more allowing than the success typing).
275
The following options are also available but their use is not recommended:
276
(they are mostly for Dialyzer developers and internal debugging)
228
278
Warn about overspecified functions
229
(the -spec is strictly less allowing than the success typing)
279
(those whose -spec is strictly less allowing than the success typing).
231
Warn when the -spec is different than the success typing
281
Warn when the -spec is different than the success typing.
234
*** These are options that turn on warnings rather than turning them off.
284
*** Identifies options that turn on warnings rather than turning them off.
237
287
-----------------------------------------------
321
370
option. Suppose you want to also include the compiler in the PLT and
322
371
place it in a new PLT, then give the command
324
dialyzer --add_to_plt -r $ERL_TOP/lib/compiler/ebin --output_plt my.plt
373
dialyzer --add_to_plt --apps compiler --output_plt my.plt
326
375
Then you would like to add your favorite application my_app to the new
329
dialyzer --add_to_plt --plt my.plt -r <path>/my_app/ebin
378
dialyzer --add_to_plt --plt my.plt -r <path>/my_app/ebin
331
380
But you realize that it is unnecessary to have compiler in this one.
333
dialyzer --remove_from_plt --plt my.plt -r $ERL_TOP/lib/compiler/ebin
382
dialyzer --remove_from_plt --plt my.plt ---apps compiler
335
384
Later, when you have fixed a bug in your application my_app, you want
336
385
to update the plt so that it will be fresh the next time you run
337
386
Dialyzer, run the command
339
dialyzer --check_plt --plt my.plt
388
dialyzer --check_plt --plt my.plt
341
390
Dialyzer will then reanalyze the files that have been changed, and the
342
391
files that depend on these files. Note that this consistency check