Skip to main content

Pre push hook running linters.

Project description

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

  1. Custom Pyflakes configuration file

LINTER_FLAKE_CONFIG="./setup.cfg" python ...
  1. Warnings only for changed lines

CHANGED_LINES_ONLY=1 python ...

Troubleshooting

  1. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-pre-push-hook-0.2.3.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_pre_push_hook-0.2.3-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file git-pre-push-hook-0.2.3.tar.gz.

File metadata

File hashes

Hashes for git-pre-push-hook-0.2.3.tar.gz
Algorithm Hash digest
SHA256 ff6fcc0c7d4e0704302647152fb92c8a29cbd2147947f19d6c79a4e217acb1a5
MD5 e134e101a0dc6b3c5b99201c7e42ec4c
BLAKE2b-256 ef8f22a6ebd85452272c511d16b5fb363cdb583f7131297434129c833e63f4b1

See more details on using hashes here.

File details

Details for the file git_pre_push_hook-0.2.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for git_pre_push_hook-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7542597695fcca75515116540be9c35036d68f1fc5a9a540c845cbfd7b8cc0b0
MD5 1868eb59457b70f9402c4528431ee82f
BLAKE2b-256 6d8a2df274b4899bcc96d1fd4e18019fddfa296161ab89fd4787b8e636c4505a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page