pre-commit 392 B

12345678910111213141516
  1. #!/bin/sh
  2. # Create a link to this file at .git/hooks/pre-commit to
  3. # force PEP8 validation prior to committing
  4. #
  5. # Ignored violations:
  6. #
  7. # W504: Line break after binary operator
  8. # E501: Line too long
  9. exec 1>&2
  10. echo "Validating PEP8 compliance..."
  11. pycodestyle --ignore=W504,E501 netbox/
  12. echo "Checking for missing migrations..."
  13. python netbox/manage.py makemigrations --dry-run --check