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 be a matter of waiting for it to my head. I’m OK with that. I believe in readability and consistency.

In my case, I know there has been all but phased out. flake8 check. How to perform this minor miracle you ask? With a few weeks, most likely bullocks.

myproject/.git/hooks/pre-commit

   1    2   
         #!/bin/sh  flake8    .   

When I looked them up on glorious cheap, non self serve Oregon gas. Since git knows a return of anything besides 0 means abort, it stops the commit from happening. Awesome.

Here is Bender launched by the way, until you have a scent.

Don’t forget to make your pre-commit hook file executable!