mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
0191806f92
The custom queries are configured in rebar.config via the tuple {xref_queries, [{query(), query_result()},...]}. The implementation passes the query() string to xref:q and compares the return value with query_result(). It will result in an error if they do not match. The following configuration, for example, is the same as running the xref check undefined_function_calls. It additionally filters ejabberd_logger:*_msg/4 from the result as these functions are generated on execution by ejabberd and not available at compile time. {xref_queries, [{"(XC - UC) || (XU - X - B - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}. This patch also modifies the build process of this package by running a custom query instead of doing a diff against a static xref_warning file.
22 lines
388 B
Makefile
22 lines
388 B
Makefile
.PHONY: dialyzer_warnings xref_warnings
|
|
|
|
all:
|
|
./bootstrap
|
|
|
|
clean:
|
|
@rm -rf rebar ebin/*.beam inttest/rt.work
|
|
|
|
debug:
|
|
@./bootstrap debug
|
|
|
|
check: debug xref dialyzer
|
|
|
|
xref:
|
|
-@./rebar xref
|
|
|
|
dialyzer: dialyzer_warnings
|
|
@diff -U0 dialyzer_reference dialyzer_warnings
|
|
|
|
dialyzer_warnings:
|
|
-@dialyzer -q -n ebin -Wunmatched_returns -Werror_handling \
|
|
-Wrace_conditions > dialyzer_warnings
|