This is the command line version for automated use. Below is a brief description of the list of its options. The same information can be obtained by writing
"dialyzer --help"
in a shell. Please refer to the GUI description in the User's Guide, for more details on the operation of Dialyzer.
The exit status of the command line version is:
0 - No problems were encountered during the analysis and no warnings were emitted. 1 - Problems were encountered during the analysis. 2 - No problems were encountered, but warnings were emitted. Usage: dialyzer [--otp OTP_DIR] [--help] [--version] [--shell] [-pa dir]* [-plt plt] [-Ddefine]* [-I include_dir]* [--output_plt file] [-Wwarn]* [--src] [-c applications] [-r applications] [-o outfile] [-q] Options: -c applications (or --command-line applications) use Dialyzer from the command line (no GUI) to detect defects in the specified applications (directories or .erl or .beam files) -r applications same as -c only that directories are searched recursively for subdirectories containing .erl or .beam files (depending on the type of analysis) -o outfile (or --output outfile) when using Dialyzer from the command line, send the analysis results in the specified "outfile" rather than in stdout --src overwrite the default, which is to analyze BEAM bytecode, and analyze starting from Erlang source code instead -Dname (or -Dname=value) when analyzing from source, pass the define to Dialyzer (**) -I include_dir when analyzing from source, pass the include_dir to Dialyzer (**) --output_plt file Store the plt at the specified location after building it. --no_warn_on_inline Suppress warnings when analyzing an inline compiled bytecode file. -plt plt Use the specified plt as the initial plt. If the plt was built during setup the files will be checked for consistency. -pa dir Include dir in the path for Erlang. Useful when analyzing files that have '-include_lib()' directives. -Wwarn a family of option which selectively turn on/off warnings. (for help on the names of warnings use dialyzer -Whelp) --otp OTP_DIR overrides the default location of the Erlang/OTP system to use --shell do not disable the Erlang shell while running the GUI --version (or -v) prints the Dialyzer version and some more information and exits --help (or -h) prints this message and exits -q makes Dialyzer a bit more quiet
* denotes that multiple occurrences of these options are possible. ** options -D and -I work both from command-line and in the Dialyzer GUI; the syntax of defines and includes is the same as that used by "erlc". |
Warning options: -Wno_return Suppress warnings for functions of no return. -Wno_unused Suppress warnings for unused functions. -Wno_improper_lists Suppress warnings for construction of improper lists. -Wno_tuple_as_fun Suppress warnings for using tuples instead of funs. -Wno_fun_app Suppress warnings for fun applications that will fail. -Wno_match Suppress warnings for pattern matching operations that will never succeed. -Wno_comp Suppress warnings for term comparisons that will always return false. -Wno_guards Suppress warnings for guards that will always fail. -Wno_unsafe_beam Suppress warnings for unsafe BEAM code produced by an old BEAM compiler. -Werror_handling *** Include warnings for functions that only return by means of an exception. Note: *** This is the only option that turns on warnings rather than turning them off.
The discrepancies currently identified by Dialyzer can be classified in the following categories:
TYPE ERRORS
REDUNDANT OR UNREACHABLE CODE
CODE RELICS
At this point, we very much welcome user feedback (even wish-lists!). If you notice something weird, especially if the Dialyzer reports any discrepancy that is a false positive, please send an error report describing the symptoms and how to reproduce them