Tommy
Tommy

Reputation: 13662

Erlang: run dialyzer on your whole application

I have an OTP application with the standard dir setup:

config/
log/
doc/
src/
_build/
rebar.config

I am able to run dialyzer on a src file like dialyzer src/source_name.erl. But this is kind of useless because function X in src/foo1 may call a function Y in src/foo2, and you want to make sure X is passing the right type of argument to Y.

How do I use dialyzer to check all the interactions between function calls in my /src repo?

Upvotes: 0

Views: 271

Answers (2)

Konstantinos Kallas
Konstantinos Kallas

Reputation: 1

You can also try this:

dialyzer --src -r .

Or this:

dialyzer --src -r src

In order to recursively analyze the source code of your current directory or the src directory

Upvotes: 0

Tommy
Tommy

Reputation: 13662

OK, the solution I found was to:

  1. compile with +debug_info
  2. recursively analyze the beam directory instead of the src directly

after compiling my command was

dialyzer -r _build/default/lib/myappname/ebin/

Upvotes: 1

Related Questions