arcusfelis.github.com

Dialyzer

Dializer is a static analysis tool. It uses Persistent Lookup Table for storing information. First of all, we need to build PLT:

1
dialyzer  --build_plt  --apps erts kernel stdlib

It is time for a cup of coffee, because it will take about 20 minutes. Fortunately, it can be called only once.

The next step is only 3-minutes long, but it will be called regularly. This command will show the errors:

1
2
3
dialyzer -n -nn -pa ../xapian/ebin -pa deps/seqbind/ebin/ -pa
deps/erlando/ebin/ -pa deps/parse_trans/ebin/ --src src/ deps/erlando/src/
deps/poolboy/src/

The parameters are:

  • -n Skip the plt check when running Dialyzer. Useful when working with installed plts that never change.

It saves few seconds.

  • -nn Bypass the native code compilation of some key files that Dialyzer heuristically performs when dialyzing many files; this avoids the compilation time but it may result in (much) longer analysis time.

The native code compilation is slow. So, add this parameter to save time.

  • -pa This parameter adds the code for parse transforms.

  • --src Add the source code and few dependencies to analyze.

The errors in dependencies will be also shown.