summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2023-01-04 22:02:20 +0000
committerJan Lehnardt <jan@apache.org>2023-01-05 15:20:43 +0100
commite03bc117f7f2131e48772525ef30e70f971ec672 (patch)
treeb0e938006b7528e0440a1116d4ae916a06bde502
parent181b809dd536ba874942f2ba1c44c672f25d258c (diff)
downloadcouchdb-e03bc117f7f2131e48772525ef30e70f971ec672.tar.gz
add find_bugs makefile target for undefined functions
-rw-r--r--Makefile5
-rw-r--r--rebar.config.script1
2 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4359a6dd3..00036cc68 100644
--- a/Makefile
+++ b/Makefile
@@ -350,6 +350,11 @@ dialyze: .rebar
@$(REBAR) -r dialyze $(DIALYZE_OPTS)
+.PHONY: find_bugs
+# target: xref - find unused exports etc
+find_bugs:
+ @$(REBAR) --keep-going --recursive xref $(DIALYZE_OPTS)
+
.PHONY: introspect
# target: introspect - Check for commits difference between rebar.config and repository
introspect:
diff --git a/rebar.config.script b/rebar.config.script
index 1ae61129f..c6aced66b 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -194,6 +194,7 @@ AddConfig = [
{lib_dirs, ["src"]},
{erl_opts, [{i, "../"}, {d, 'COUCHDB_ERLANG_VERSION', VerString}]},
{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]},
+ {xref_checks, [undefined_function_calls, undefined_functions]},
{plugins, [eunit_plugin]},
{dialyzer, [
{plt_location, local},