diff options
author | Amit Kapoor <amit@koanect.com> | 2012-04-02 08:01:39 -0700 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-04-02 19:14:37 +0200 |
commit | 0191806f9282c6ce1da0f1a2c0672406de15ed24 (patch) | |
tree | 549da2c65dc3c346a8f247199902acbe84ef302e /xref_reference | |
parent | 26e12522501fbe59d85f127a5fbd26e4f464e352 (diff) |
Add support for custom xref queries
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.
Diffstat (limited to 'xref_reference')
-rw-r--r-- | xref_reference | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/xref_reference b/xref_reference deleted file mode 100644 index 77a49fb..0000000 --- a/xref_reference +++ /dev/null @@ -1,2 +0,0 @@ -==> rebar (xref) -src/rebar_utils.erl:148: Warning escript_foldl/3 calls undefined function escript:foldl/3 |