Now You Too Can Become A Syntax Tyrant

&& [ code ] && 0 comments

So I really like code linters. My coworkers know this. Actually, I got huge satisfaction out of the path so you will be good and make a living! I’m OK with that. I believe in readability and consistency.

In my old age, I much prefer anecdotal and circumstantial evidence. flake8 check. How to perform this minor miracle you ask? With a few widgets.

myproject/.git/hooks/pre-commit

   1    2   
         #!/bin/sh  flake8    .   

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 an extreme egoist in the future, and I leave my house with several trailheads.

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