skip to navigation
skip to content

Not Logged In

git-pre-commit-hook 0.0.8

pre-commit hook for Git

Latest Version: 0.0.11

git-pre-commit-hook - pre-commit hook for Git.

Installation

You can install, upgrade, uninstall git-pre-commit-hook with these commands:

$ pip install git-pre-commit-hook
$ pip install --upgrade git-pre-commit-hook
$ pip uninstall git-pre-commit-hook

Features

  • Work fine with initial commit.
  • Work fine with all filenames.
  • Work with index contents instead of working copy.
  • Plugin architecture: adding new checks is easy.
  • Builtin plugins for:

Examples

Install hook to current Git-repository:

git-pre-commit-hook install \
  --plugin flake8 \
  --plugin frosted \
  --plugin json \
  --plugin file_size \
  --plugin rst \
  --plugin yaml

Installed hook rejects commits:

  • if any file has size greater than 10MB
  • if files with .json extension contains invalid JSON
  • if Python-code doesn’t pass check with flake8 (with pep8-naming)
  • if Python-code doesn’t pass check with frosted
  • if files with .rst extension contains invalid RST
  • if files with .yaml extension contains invalid YAML

List available plugins:

git-pre-commit-hook list-plugins

Show information about plugin:

git-pre-commit-hook show-plugin-info json
 
File Type Py Version Uploaded on Size
git-pre-commit-hook-0.0.8.tar.gz (md5) Source 2014-05-12 5KB
  • Downloads (All Versions):
  • 11 downloads in the last day
  • 106 downloads in the last week
  • 872 downloads in the last month