diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-12-04 20:56:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 20:56:48 -0500 |
commit | f4cc17c621e7b6459cc011f5d2361cfb4e11001a (patch) | |
tree | e9770a467b26cfe3dd551f95ae74ef41e307f7ef /src | |
parent | d27eb3aad0c4849399d31309f68990584ac51791 (diff) | |
parent | 4deb6437f548a803509bce1ee87850c5501edc03 (diff) |
Merge pull request #1965 from starbelly/single-module-xref-support
Support ignoring entire modules in xref results
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_xref.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rebar_prv_xref.erl b/src/rebar_prv_xref.erl index 12063d5..3c987b4 100644 --- a/src/rebar_prv_xref.erl +++ b/src/rebar_prv_xref.erl @@ -160,7 +160,8 @@ get_xref_ignorelist(Mod, XrefCheck) -> %% And create a flat {M,F,A} list lists:foldl( fun({F, A}, Acc) -> [{Mod,F,A} | Acc]; - ({M, F, A}, Acc) -> [{M,F,A} | Acc] + ({M, F, A}, Acc) -> [{M,F,A} | Acc]; + (M, Acc) when is_atom(M) -> [M | Acc] end, [], lists:flatten([IgnoreXref, BehaviourCallbacks])). keyall(Key, List) -> @@ -195,7 +196,8 @@ filter_xref_results(XrefCheck, XrefIgnores, XrefResults) -> end, SearchModules), [Result || Result <- XrefResults, - not lists:member(parse_xref_result(Result), Ignores)]. + not lists:member(element(1, Result), Ignores) + andalso not lists:member(parse_xref_result(Result), Ignores)]. display_results(XrefResults, QueryResults) -> [lists:map(fun display_xref_results_for_type/1, XrefResults), |