aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-11-01 16:59:48 +0100
committerLoïc Hoguin <[email protected]>2014-11-01 16:59:48 +0100
commit724f024bbffaa56dadb10ed88130831ed7e81b09 (patch)
tree2ab33a89018184bc55e236fba20808f26b19dfbb
parent16c531430d89e97a40fc275878a56390c069e407 (diff)
downloaderlang.mk-724f024bbffaa56dadb10ed88130831ed7e81b09.tar.gz
erlang.mk-724f024bbffaa56dadb10ed88130831ed7e81b09.tar.bz2
erlang.mk-724f024bbffaa56dadb10ed88130831ed7e81b09.zip
Allow overriding the method and directories analyzed by Dialyzer
-rw-r--r--README.md5
-rw-r--r--erlang.mk3
-rw-r--r--plugins/dialyzer.mk3
3 files changed, 8 insertions, 3 deletions
diff --git a/README.md b/README.md
index 8a02002..9672670 100644
--- a/README.md
+++ b/README.md
@@ -301,7 +301,10 @@ included in the PLT file. There is no need to specify `erts`,
are automatically added.
Dialyzer options can be modified by defining the `DIALYZER_OPTS`
-variable. For more information please see `erl -man dialyzer`.
+variable. The directories to be analyzed can be overriden using
+the `DIALYZER_DIRS` variable. It defaults to analyzing source
+files recursively found in `src/`. For more information please
+see `erl -man dialyzer`.
EDoc plugin
-----------
diff --git a/erlang.mk b/erlang.mk
index 74820c7..fd7f0fd 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -628,6 +628,7 @@ DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
export DIALYZER_PLT
PLT_APPS ?=
+DIALYZER_DIRS ?= --src -r src
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions \
-Wunmatched_returns # -Wunderspecs
@@ -656,7 +657,7 @@ dialyze:
else
dialyze: $(DIALYZER_PLT)
endif
- @dialyzer --no_native --src -r src $(DIALYZER_OPTS)
+ @dialyzer --no_native $(DIALYZER_DIRS) $(DIALYZER_OPTS)
# Copyright (c) 2013-2014, Loïc Hoguin <[email protected]>
# This file is part of erlang.mk and subject to the terms of the ISC License.
diff --git a/plugins/dialyzer.mk b/plugins/dialyzer.mk
index db1143a..3482c1b 100644
--- a/plugins/dialyzer.mk
+++ b/plugins/dialyzer.mk
@@ -9,6 +9,7 @@ DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
export DIALYZER_PLT
PLT_APPS ?=
+DIALYZER_DIRS ?= --src -r src
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions \
-Wunmatched_returns # -Wunderspecs
@@ -37,4 +38,4 @@ dialyze:
else
dialyze: $(DIALYZER_PLT)
endif
- @dialyzer --no_native --src -r src $(DIALYZER_OPTS)
+ @dialyzer --no_native $(DIALYZER_DIRS) $(DIALYZER_OPTS)