=head1 TO-DO list of niceties for the future of Git::Hooks.
The following list is in approximately my order of implementation
intention. Any comments or other suggestion are welcome at gnustavo AT
cpan.org.
=head2 Support Gerrit hooks
Gerrit is a "web based code review and project management tool for Git
based projects" (L<https://code.google.com/p/gerrit/>). It's based on
JGit (L<http://eclipse.org/jgit/>) which, as of 2012-01-14, still
doesn't support git's standard hooks.
But Gerrit has its own hook infrastructure and we should support it
(L<http://gerrit-documentation.googlecode.com/svn/Documentation/2.5.1/config-hooks.html>).
The two hooks that seem to be relevant to Git::Hooks's plugins are
B<patchset-created> and B<ref-updated>.
=head2 Support the WIN32 Platform
Currently we abort the build on C<Makefile.PL>.
=head2 Improve documentation
We need:
=over
=item * A user-friendly README
=item * A user tutorial
=item * A plugin developer tutorial
=item * Revise documentation and make it more uniform
=item * Follow the advice in
L<http://blog.smartbear.com/software-quality/bid/256072>
=back
=head2 I18N
Use Locale::TextDomain to internationalize it.
=head2 L10N pt_BR
As a first job after i18n I intend to nationalize it to Brazilian
Portuguese.
=head2 Let the user control which config files to read
Let the user tell which configuration files Git::Hooks should
consider. Currently it considers the three default ones (system,
global, and local), without knowing which one sets what. Perhaps we
could have a new option C<githooks.extra_config> that could be set
with an array of filenames to invoke C<git config --file> with in
succession. This option, if set in the default configuration files,
could tell Git::Hooks to grok an extra set of configuration from
specific files.
=head2 In CheckAcls implement DENY for ACL operations
Along the lines of NFSv4 ACLs
(L<http://tools.ietf.org/html/rfc5661#section-6>). I'm thinking about
prefixing the what component with a '!'.
=head2 Implement equivalents for the SVN::Hooks plugins
In L<http://search.cpan.org/dist/SVN-Hooks/>. Currently we're missing
DenyFilenames and UpdateConfFile. Actually, I'm thinking that
UpdateConfFile is too much specific. Perhaps something along the lines
of this post-update hook would be more interesting:
L<http://stackoverflow.com/questions/279169/deploy-a-project-using-git-push>.
=head2 Implement the Scott Chacon example hooks
In L<https://github.com/schacon/githooks>.
=head2 In CheckLog allow for stop words
C<CheckLog.spelling> should have a way to register stop words. I'd
have to ask for a change in Text::SpellChecker.
=head2 CheckLog should check the footer of the commit log message
The Gerrit default C<commit-msg> implements some checks that could be
used here. Some other things to check:
=over
=item Require Signed-off-by lines
(L<https://github.com/icefox/git-hooks/blob/master/git_hooks/commit-msg/signed-off-by>)
=item Duplicate Signed-off-by lines
(L<https://github.com/icefox/git-hooks/blob/master/contrib/commit-msg/duplicate-signedoffby>)
=back
=head2 Implement the Git::Hooks::CheckWhiteSpace plugin
Some people (e.g. Linus Torvalds) prefer spaces, others prefer tabs.
Some people prefer tab size at 8 characters, others prefer at 4.
This plugin should be able to check these preferences for selected
types of files. Some configuration would be like this:
=over
=item * githooks.checkwhitespace.indentation [tab|space|any]
By default any kind of white-space should be allowed. But one could
specify B<tab> for tabs only or B<space> for space only.
Note that this checks only the indentation space in each line.
=item * githooks.checkwhitespace.files REGEXP
This multi-valued option defines the files that should be checked. By
default, no file is checked.
=item * githooks.checkwhitespace.trailing [allow|deny]
By default trailing white space is denied. But one should be able to
allow it.
=back
This way, the options are fixed for any file. Would it be desirable to
have different options for different kind of files?
=head2 Implement the Git::Hooks::CheckFile plugin
Implement a hook to make it easy to perform some checks on
added/modified files. For instance, Perl files should be syntax
checked. This could be configured somewhat like this:
CheckFile.rule "\.p[lm]$ perl -c"
The first 'word' in the value would be a regexp used to match the
files we're interested in. All that follows would be a command to
which the filename would be passed.
This would allow for all kinds of checks specific for some kinds of
files. Some interesting ideas here:
L<http://tech.yipit.com/2011/11/16/183772396/>.