Skip to content

Instantly share code, notes, and snippets.

View Norbo11's full-sized avatar

Norbert Podsadowski Norbo11

View GitHub Profile
@Norbo11
Norbo11 / Run Flake8 before pushing
Last active October 26, 2023 11:17
Pre-push git hook to run flake8 on changed .py files only
Stick this file inside your-repo/.git/hooks/ and update the path to flake8. Make sure you also `chmod +x your-repo/git/hooks/pre-push` or git won't run your hooks.
When you push from an IDE, the presentation of the result may vary.
In IntelliJ IDEA, the Console tab under Version Control will list all flake errors detected before the push.