<div dir="ltr">Hi Alexander,<div><br></div><div>when it comes to included files (or parse transforms), Dialyzer accepts the same flags as the compiler. In your case adding "-I deps/erlsom/src/" should be enough.</div><div><br></div><div>It is however *much* simpler to just make sure that you compile your code with "+debug_info" and run Dialyzer directly on the .beam file(s).</div><div><br></div><div>Best,</div><div><br></div><div>Stavros Aronis<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 12:33 PM, Alexander Petrovsky <span dir="ltr"><<a href="mailto:askjuise@gmail.com" target="_blank">askjuise@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi!<div><br></div><div>I've built PLTs with the follow commands via Makefile:</div><div><br></div><div><div>DIALYZER_APPS = asn1 compiler crypto erts inets kernel public_key sasl ssl stdlib syntax_tools tools</div><div><br></div><div>...</div><div><br></div><div>dialyzer --build_plt --output_plt erlang.plt --apps $(DIALYZER_APPS)<br></div><div><div>dialyzer --build_plt --output_plt my_app.plt ebin/ deps/*/ebin/</div></div><div><br></div><div>then I want to check my code with dialyzer but got the follow errors:</div><div><br></div><div><div>$ make dialyzer</div><div>dialyzer --src src --plts erlang.plt my_app.plt -Wunmatched_returns -Werror_handling -Wrace_conditions -Wunderspecs | fgrep -v -f ./dialyzer.ignore-warnings</div><div>  Checking whether the PLT erlang.plt is up-to-date... yes</div><div>  Checking whether the PLT my_app.plt is up-to-date... yes</div><div>  Proceeding with analysis...</div><div>dialyzer: Analysis failed with error:</div><div>Could not scan the following file(s):</div><div>/home/juise/my_app/src/my_app_parser.erl:10: can't find include lib "erlsom/src/erlsom_sax.hrl"</div><div>/home/juise/my_app/src/my_app_parser.erl:99: record attribute undefined</div><div>/home/juise/my_app/src/my_app_parser.erl:100: variable 'Name' is unbound</div><div>/home/juise/my_app/src/my_app_parser.erl:100: variable 'Name' is unbound</div><div>/home/juise/my_app/src/my_app_parser.erl:100: variable 'Value' is unbound</div></div><div><br></div><div>In my_app_parser I have:</div><div><br></div><div><div>-include_lib("erlsom/src/erlsom_sax.hrl").</div></div><div><br></div><div>How to say dialyzer to find erlsom_sax.hrl in deps/erlsom/src/ ? How can I fix it?</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 914 8 820 815<div><br></div></div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>