summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2023-01-04 22:02:20 +0000
committerRobert Newson <rnewson@apache.org>2023-01-04 22:02:20 +0000
commitd524ddb4ffe3585a86aa8b657f30e0e22d07b307 (patch)
tree2c3bd87b1f418881fce0121c6b2ecddcb56c41d6
parentf8d489f3185accb9acd4d732330d52d9d05bb19a (diff)
downloadcouchdb-d524ddb4ffe3585a86aa8b657f30e0e22d07b307.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},