Giter VIP home page Giter VIP logo

app-githooks's Introduction

App-GitHooks

Build Status Coverage Status CPAN License

App::GitHooks is an extensible and easy to configure git hooks framework that supports many plugins.

OVERVIEW

  • Here's an example of it in action, running the pre-commit hook checks before the commit message can be entered:

    Successful checks

  • Here is another example, with a Perl file that fails compilation this time:

    Failing checks

INSTALLATION

  1. Install this distribution (with cpanm or your preferred CPAN client):

     cpanm App::GitHooks
    
  2. Install the plugins you are interested in (with cpanmor your prefered CPAN client), as App::GitHooks does not bundle them. See the list of plugins below, but for example:

     cpanm App::GitHooks::Plugin::BlockNOCOMMIT
     cpanm App::GitHooks::Plugin::DetectCommitNoVerify
     ...
    
  3. Go to the git repository for which you want to set up git hooks, and run:

     githooks install
    
  4. Enjoy!

OFFICIALLY SUPPORTED PLUGINS

Prevent committing code with #NOCOMMIT mentions.

Prevent commits in a production environment.

Find out when someone uses --no-verify and append the pre-commit checks to the commit message.

Force running a specific tool at regular intervals.

Detect discrepancies between the ticket ID specified by the branch name and the one in the commit message.

Verify that Perl files compile without errors.

Verify that all changes and addition to the Perl files pass PerlCritic checks.

Enforce a specific Perl interpreter on the first line of Perl files.

Verify that the syntax of PgBouncer auth files is correct.

Derive a ticket ID from the branch name and prepend it to the commit-message.

Require a commit message.

Verify that staged Ruby files compile.

Validate POD format in Perl and POD files.

CONTRIBUTED PLUGINS

Verify that staged Ruby files compile.

Prevent trailing whitespace from being committed.

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the perldoc command.

perldoc App::GitHooks

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright (C) 2013-2017 Guillaume Aubert.

This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

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 LICENSE file for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.