Pre push hook running linters.
Free software: BSD license
Installation
pip install git-pre-push-hook
Install hook to current Git-repository:
install-git-pre-push-hook
Default pre-push hook:
python -c "import pre_push_hook; sys.exit(pre_push_hook.hook.main())"
Configuration
You can pass configuration parameters to script by setting proper environement variables in ./.git/hooks/pre-push
Custom Pyflakes configuration file
LINTER_FLAKE_CONFIG="./setup.cfg" python ...
Warnings only for changed lines
CHANGED_LINES_ONLY=1 python ...
Troubleshooting
In OSX not prompt question is displayed and after pressing any key EOFError is raised:
Maybe you are not using system Python. E.g. MacPorts have problem with using stdin ( see: http://superuser.com/questions/965133/python2-7-from-macports-stdin-issue). Try using system Python (System/Library/Frameworks/Python.framework/Versions/Current/bin/python)
Development
To run the all tests run:
tox
Changelog
0.1.0 (2016-01-06)
First release on PyPI.
Metadata
Release files for git-pre-push-hook 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git-pre-push-hook-0.2.6.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_pre_push_hook-0.2.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 24.3 kB
Release files / git-pre-push-hook-0.2.6.tar.gz
| Download URL | git-pre-push-hook-0.2.6.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b724c3fe9ebee824383313462f73d8b246b750e3963bfdf1b1caecd0243f6979
|
|
BLAKE2b-256 checksum How to use checksums |
97018c52c0a0e36ec21eeb8b7055cdb0a50282054df0ca6793ab9d3d46924ce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / git_pre_push_hook-0.2.6-py2.py3-none-any.whl
| Download URL | git_pre_push_hook-0.2.6-py2.py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4723e35aca3b2258d37b9d604f96ebdc465a0c1acf71398fb425a3f415d43a5a
|
|
BLAKE2b-256 checksum How to use checksums |
80fa7ffb66a1330d3c3a5d382a79b14514f93e642dedb7b0f1c0206578d7b96a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |