2014-04-12 13:09:26 +02:00
|
|
|
#+STARTUP: showall
|
|
|
|
#+OPTIONS: toc:nil
|
|
|
|
|
2014-04-12 13:04:12 +02:00
|
|
|
* commit-check v0.1.0
|
|
|
|
|
|
|
|
This is the commit-check project. It is a quick and easy commit
|
|
|
|
style checker that can be used either as a git hook to enforce the
|
|
|
|
style checked by commit-check, or as a syntax checker back-end (like
|
|
|
|
[[http://flycheck.readthedocs.org/en/latest/][Flycheck]]).
|
|
|
|
|
|
|
|
The entire code for the project is currently contained in the
|
2014-04-12 13:11:33 +02:00
|
|
|
~commit-check~ file. The files ~test-pass.txt~, ~test-fail-barely.txt~ and
|
|
|
|
~test-fail-miserably.txt~ are used for testing purposes. They contain
|
|
|
|
and explain certain situations that can occur when writing commits
|
|
|
|
that may or may not cause errors to be reported.
|
2014-04-12 13:09:26 +02:00
|
|
|
|
|
|
|
** Installation
|
|
|
|
|
|
|
|
commit-check can either be used manually (or as a back-end to some
|
|
|
|
other tool), or as a git ~commit-msg~ hook to stop you from
|
|
|
|
committing badly styled commit messages.
|
|
|
|
|
|
|
|
*** For manual use
|
|
|
|
|
|
|
|
To get this project up and running make sure you have perl
|
|
|
|
installed and that commit-check is somewhere in your ~PATH~.
|
|
|
|
|
|
|
|
*** As git hook
|
|
|
|
|
|
|
|
Place the commit-check executable file in the ~.git/hooks~ directory
|
|
|
|
of your project, with the name ~commit-msg~. It doesn't need to be
|
|
|
|
the actual executable, it can also be a (soft) link to the
|
|
|
|
executable, or a script running this program (passing along all
|
|
|
|
arguments).
|
2014-04-12 13:11:33 +02:00
|
|
|
|
2014-04-12 13:45:32 +02:00
|
|
|
*** Usage
|
|
|
|
|
|
|
|
When used as a git ~commit-msg~ hook it should just be a question of
|
|
|
|
getting it in the right place and it'll work. If, however, you
|
|
|
|
have another use for it and need to run it manually, there are
|
|
|
|
some command-line options that you can use:
|
|
|
|
|
|
|
|
- =-h= :: Show a short help message to help you along.
|
|
|
|
- =-0= :: Always exit with a ~0~ exit status.
|
|
|
|
|
|
|
|
Some tools, such as the before-mentioned Flycheck, don't like it
|
|
|
|
when the back-end tool exits with a non-zero exit status and think
|
|
|
|
that means that the tool failed to run. To keep such tools happy
|
|
|
|
the =-0= can be used.
|
|
|
|
|
|
|
|
commit check expects the file to check as the last argument on the
|
|
|
|
command line (or actually, the first non-option argument).
|
|
|
|
|
2014-04-12 13:11:33 +02:00
|
|
|
** License
|
|
|
|
|
|
|
|
This project is licensed under the GNU GPLv3, its terms and
|
|
|
|
conditions can be found in the file ~COPYING~ in the project source
|
|
|
|
tree.
|