1

I've been trying to find an example of a git hook that checks if the files being committed are python, and if they are what version of python was used.

Jim Bob
  • 63
  • 5

1 Answers1

0

You could use a hook like sebdah/git-pylint-commit-hook, modifying it to exit if pylint reports an error (which it will for non-python files)

But for detecting the writing style, there are no magic bullet: as stated here, you would need to compile with python2 or python3 (still in the hook).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250