1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #2559: Add a pre-commit git hook to enforce PEP8 validation

This commit is contained in:
Jeremy Stretch
2018-11-08 13:52:34 -05:00
parent 69d829ce8d
commit 61ca7ee7c2

14
scripts/git-hooks/pre-commit Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
# Create a link to this file at .git/hooks/pre-commit to
# force PEP8 validation prior to committing
#
# Ignored violations:
#
# W504: Line break after binary operator
# E501: Line too long
exec 1>&2
echo "Validating PEP8 compliance..."
pycodestyle --ignore=W504,E501 netbox/