Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enhance make check (Inspired-by: Stavros Aronis)

  • Loading branch information...
commit af3eab652259260b139456807557342ae4876e54 1 parent 27e5a0a
@tuncer tuncer authored
2  .gitignore
@@ -6,5 +6,7 @@ rebar
22 Makefile
@@ -1,3 +1,5 @@
+.PHONY: dialyzer_warnings xref_warnings
@@ -5,9 +7,19 @@ clean:
@rm -rf rebar ebin/*.beam inttest/
- ./bootstrap debug
+ @./bootstrap debug
+check: debug xref dialyzer
+xref: xref_warnings
+ @diff -U0 xref_reference xref_warnings
+ -@./rebar xref > xref_warnings
+dialyzer: dialyzer_warnings
+ @diff -U0 dialyzer_reference dialyzer_warnings
-check: debug
- -@./rebar xref
- -@dialyzer ebin --verbose -Wunmatched_returns -Werror_handling \
- -Wrace_conditions
+ -@dialyzer -q -n ebin -Wunmatched_returns -Werror_handling \
+ -Wrace_conditions > dialyzer_warnings
@@ -14,8 +14,9 @@ locations (git, hg, etc).
-Information on building and installing Erlang/OTP can be found
-in the `` document.
+Information on building and installing [Erlang/OTP](
+can be found [here](
+([more info](
### Dependencies
@@ -28,7 +29,9 @@ Should you want to clone the rebar repository, you will also require git.
Clone the git repository:
- $ git clone git://
+$ git clone git://
#### Building rebar
@@ -69,7 +72,8 @@ Do not mix spaces and tabs.
Do not introduce lines longer than 80 characters.
[erlang-mode (emacs)]( indentation is preferred.
-vi-only users are encouraged to give [Vim emulation]( ([more info]( a try.
+vi-only users are encouraged to give [Vim emulation](
+([more info]( a try.
Writing Commit Messages
@@ -106,18 +110,32 @@ Longer description (wrap at 72 characters)
Dialyzer and Tidier
-Before you submit a patch check for discrepancies with
+Before you submit a patch check for
+[xref]( and
+A successful run of ``make check`` looks like:
$ make check
+Recompile: src/rebar_core
+==> rebar (compile)
+Command 'debug' not understood or not applicable
+Congratulations! You now have a self-contained script called "rebar" in
+your current working directory. Place this script anywhere in your path
+and you can use rebar to build OTP-compliant apps.
+make: [xref_warnings] Error 1 (ignored)
+make: [dialyzer_warnings] Error 2 (ignored)
-The following discrepancies are known and safe to ignore:
-rebar_utils.erl:147: Call to missing or unexported function escript:foldl/3
+[xref]( and
+[Dialyzer]( warnings are compared
+against a set of safe-to-ignore warnings
+found in
It is **strongly recommended** to check the code with
2  dialyzer_reference
@@ -0,0 +1,2 @@
+rebar_utils.erl:163: Call to missing or unexported function escript:foldl/3
2  xref_reference
@@ -0,0 +1,2 @@
+==> rebar (xref)
+src/rebar_utils.erl:157: Warning escript_foldl/3 calls undefined function escript:foldl/3
Please sign in to comment.
Something went wrong with that request. Please try again.