Skip to content

xelaxela13/pycharm-pre-commit-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Pre-commit hooks for PyCharm

  1. Settings -> Plugins -> Pre Commit Hook Plugin - install
  2. Create a file named pre-commit-hook.sh or pre-commit-hook.bat for Windows, in your project root, exit with non-zero code to 'fail' the commit.
  3. chmod a+x pre-commit-hook.sh
  4. Settings -> Tools -> Pre Commit Hook
  5. Put a path to your script

pre-commit-hook.sh

cd ~/PycharmProjects/your-project-folder
docker exec container-name flake8 `git diff HEAD --name-only|grep ".py" || echo "path-to-folder-where-git-init"` || exit 1

About

Script for pycharm pre-commit-hooks plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published