NAME

App::GitHooks::Hook::PreCommit - Handler for pre-commit hook.

VERSION

Version 1.4.0

METHODS

run()

Run the hook handler and return an exit status to pass to git.

my $exit_status = App::GitHooks::Hook::PreCommit->run(
	app => $app,
);

Arguments:

  • app (mandatory)

    An App::GitHooks object.

run_all_tests()

Run all the tests available for the pre-commit hook and return whether issues were detected.

my $tests_success = run_all_tests( $app );

This is a two step operation:

1. We load all the plugins that support "pre-commit", and run them to analyze the overall pre-commit operation.
2. Each staged file is loaded and we run plugins that support "pre-commit-file" on each one.

BUGS

Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/App-GitHooks/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc App::GitHooks::Hook::PreCommit

You can also look for information at:

AUTHOR

Guillaume Aubert, <aubertg at cpan.org>.

COPYRIGHT & LICENSE

Copyright 2013-2015 Guillaume Aubert.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/