<commit_before>[![GitHub license][License img]][License src]

Git hooks
=========

Bunch of useful git hooks

pre-commit.sh
=========

Check for PHP syntax and debug functions before commit

![Alt php-bench](https://github.com/nafigator/git-hooks/raw/master/pre-commit.png)

###Requirements
* git
* bash
* PHP
* Coreutils

###Features
* Customization by git config options
* Check for PHP syntax before commit
* Warn bout PHP dump functions (var_dump(), var_export())
* Colored output

###Installation

Add to your project _.git/config_ options:

    [check.php]
        syntax = true
        dumps = true

Copy **pre-commit.sh** to _.git/hooks_ folder in your working copy of project:

    cp pre-commit.sh <path to project>/.git/hooks/pre-commit

  [License img]: https://img.shields.io/badge/license-BSD3-brightgreen.svg
  [License src]: https://tldrlegal.com/license/bsd-3-clause-license-(revised)<commit_msg>Typo fix<commit_after>[![GitHub license][License img]][License src]

Git hooks
=========

Bunch of useful git hooks

pre-commit.sh
=========

Check for PHP syntax and debug functions before commit

![Alt php-bench](https://github.com/nafigator/git-hooks/raw/master/pre-commit.png)

###Requirements
* git
* bash
* PHP
* Coreutils

###Features
* Customization by git config options
* Check for PHP syntax before commit
* Warn about PHP dump functions (var_dump(), var_export())
* Colored output

###Installation

Add to your project _.git/config_ options:

    [check.php]
        syntax = true
        dumps = true

Copy **pre-commit.sh** to _.git/hooks_ folder in your working copy of project:

    cp pre-commit.sh <path to project>/.git/hooks/pre-commit

  [License img]: https://img.shields.io/badge/license-BSD3-brightgreen.svg
  [License src]: https://tldrlegal.com/license/bsd-3-clause-license-(revised)
{'fraction_non_alphanumeric': 0.14050493962678376, 'fraction_numerical': 0.0021953896816684962, 'mean_word_length': 4.008241758241758, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '995925', 'n_tokens_mistral': 597, 'n_tokens_neox': 573, 'n_words': 166}