Merge: Friendly jenkins checks
authorJean Privat <jean@pryen.org>
Wed, 19 Aug 2015 19:02:06 +0000 (15:02 -0400)
committerJean Privat <jean@pryen.org>
Wed, 19 Aug 2015 19:02:06 +0000 (15:02 -0400)
Improve scripts to make jenkins error friendlier about licenses, signed-off-bys and whitespaces.

Scripts now write sentences and add a final note in case of error to explain how to solve the issues.
Once #1639 is merged, the life of new contributors will never be that easy.

Examples of new messages:

* `./checklicense.sh v0.7 63e0f2c` gives:

~~~
checklicense v0.7 (68561eb8d91800ccb3fa289bff6721ddd11dbe25) .. 63e0f2c (63e0f2c7cd96f4c40366d92614785b1006e52367)
These files are missing their licence:

benchmarks/polygons/nit/bench_polygon.nit

Please double check that the licence text (i.e. `This file is part of NIT...`) is included at the begin of these files.
~~~

* `./checksignedoffby.sh origin/master 63e0f2c7cd96f4c40366d92614785b1006e52367` gives:

~~~
checksignedoffby origin/master (b144984d92908662f47a251f1cca1fd8e57b2594) .. 63e0f2c7cd96f4c40366d92614785b1006e52367 (63e0f2c7cd96f4c40366d92614785b1006e52367)

Bad or missing Signed-off-by for commit
63e0f2c lib/graphs: add module for directed graphs
Expected (from local git config):
Signed-off-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Got:
Signed-off-by: Alexandre Blondin Massé <blondin_masse.alexandre@uqam.ca>

Please check that each commit contains a `Signed-off-by:` statement that matches the author's name and email.
Note that existing commits should be amended; pushing new commit is not sufficient.
~~~

* `./checkwhitespaces.sh origin/master e6cfa93` gives:

~~~
checkwhitespaces origin/master (b144984d92908662f47a251f1cca1fd8e57b2594) .. e6cfa93 (e6cfa93970687e33784c0251cf4da2f6e13d9f2c)

Found whitespace errors in commit
e6cfa93 Started documenting the digraph module.
lib/graphs/digraph.nit:5: trailing whitespace.
+#
lib/graphs/digraph.nit:13: trailing whitespace.
+#
lib/graphs/digraph.nit:18: trailing whitespace.
+#
lib/graphs/digraph.nit:21: trailing whitespace.
+#

Found whitespace errors in commit
e5c4311 Moved modules to lib/graphs.
lib/graphs/digraph.nit:313: trailing whitespace.
+ for

Found whitespace errors in commit
5e7bf24 Started MatrixDigraph.
lib/digraph.nit:313: trailing whitespace.
+ for

Found whitespace errors in commit
e6fd4d4 Basic methods for digraphs.
tests/test_graph.nit:34: new blank line at EOF.

Please check that each file in each commit does not contain whitespace errors.
Note that existing commits should be amended; pushing new commit is not sufficient.
Hint: use "git log --check" to see whitespace errors.
~~~

Pull-Request: #1641
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>


Trivial merge