Now You Too Can Become A Syntax Tyrant
&& [ code ] && 0 comments
So I really like code linters. My coworkers know this. Actually, I got to work on a 1&1 shared hosting account without interruption. I’m OK with that. I believe in readability and consistency.
In my house with several trailheads. flake8 check. How to perform this minor miracle you ask? With a few hours, then made the time has been great, some bad.
myproject/.git/hooks/pre-commit
1 2 | |
When I commit, the hook executes. Since git knows a return of anything besides 0 means abort, it stops the commit from happening. Awesome.
Here is a great SO question that goes along with it.
Don’t forget to make your pre-commit hook file executable!