Ignore the Elixir protocol related warnings

This commit is contained in:
Loïc Hoguin 2022-05-31 14:19:54 +02:00
parent dc70cbf281
commit fa6b9f0767
No known key found for this signature in database
GPG Key ID: C69E26E3A9DF618F
1 changed files with 13 additions and 0 deletions

View File

@ -30,8 +30,21 @@ DEP_PLUGINS = rabbit_common/mk/rabbitmq-dist.mk \
DISABLE_DISTCLEAN = 1
XREF_SCOPE = app deps
# We add all the applications that are in non-standard paths
# so they are included in the analyses as well.
XREF_EXTRA_APP_DIRS = $(filter-out deps/rabbitmq_cli/_build/dev/lib/rabbit_common/,$(wildcard deps/rabbitmq_cli/_build/dev/lib/*/)) deps/rabbit/apps/rabbitmq_prelaunch/
# For Elixir protocols the right fix is to include the consolidated/
# folders in addition to ebin/. However this creates conflicts because
# some modules are duplicated. So instead we ignore warnings from
# protocols directly.
XREF_IGNORE = [ \
{'Elixir.CSV.Encode',impl_for,1}, \
{'Elixir.JSON.Decoder',impl_for,1}, \
{'Elixir.JSON.Encoder',impl_for,1}, \
{'Elixir.RabbitMQ.CLI.Core.DataCoercion',impl_for,1}]
# Include Elixir libraries in the Xref checks.
xref: ERL_LIBS := $(ERL_LIBS):$(CURDIR)/apps:$(CURDIR)/deps:$(dir $(shell elixir --eval ":io.format '~s~n', [:code.lib_dir :elixir ]"))