Install pre-commit Hook for ESP-IDF Project¶
Python 3.6.1 or above. This is our recommendation python version for IDF developers.
If you still have versions not compatible, please do not install pre-commit hook and update your python versions.
pip install pre-commit
Install pre-commit hook¶
Go to the IDF Project Directory
pre-commit install --allow-missing-config. Install hook by this approach will let you commit successfully even in branches without the
pre-commit hook will run automatically when you’re running
For detailed usage, Please refer to the documentation of pre-commit.
Common Problems For Windows Users¶
/usr/bin/env: python: Permission denied.
If you’re in Git Bash or MSYS terminal, please check the python executable location by run
If the executable is under
~/AppData/Local/Microsoft/WindowsApps/, then it’s a link to Windows AppStore, not a real one.
Please install python manually and update this in your