mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 11:44:31 +02:00
add contributing docs
This commit is contained in:
@@ -17,7 +17,7 @@ Before sending us a Pull Request, please consider this list of points:
|
|||||||
|
|
||||||
* Does any new code conform to the esp-idf :doc:`Style Guide <style-guide>`?
|
* Does any new code conform to the esp-idf :doc:`Style Guide <style-guide>`?
|
||||||
|
|
||||||
* Have you installed the pre-commit hook for esp-idf? (please refer to https://pre-commit.com/#installation)
|
* Have you installed the :doc:`pre-commit hook <install-pre-commit-hook>` for esp-idf project?
|
||||||
|
|
||||||
* Does the code documentation follow requirements in :doc:`documenting-code`?
|
* Does the code documentation follow requirements in :doc:`documenting-code`?
|
||||||
|
|
||||||
@@ -54,6 +54,7 @@ Related Documents
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
style-guide
|
style-guide
|
||||||
|
install-pre-commit-hook
|
||||||
documenting-code
|
documenting-code
|
||||||
add-ons-reference
|
add-ons-reference
|
||||||
creating-examples
|
creating-examples
|
||||||
|
34
docs/en/contribute/install-pre-commit-hook.rst
Normal file
34
docs/en/contribute/install-pre-commit-hook.rst
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
Install pre-commit Hook for ESP-IDF Project
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
Install pre-commit
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Run ``pip install pre-commit``
|
||||||
|
|
||||||
|
Install pre-commit hook
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
1. Go to the IDF Project Directory
|
||||||
|
|
||||||
|
2. Run ``pre-commit install --allow-missing-config``. Install hook by this approach will let you commit successfully even in branches without the ``.pre-commit-config.yaml``
|
||||||
|
|
||||||
|
3. pre-commit hook will run automatically when you're running ``git commit`` command
|
||||||
|
|
||||||
|
What's More?
|
||||||
|
------------
|
||||||
|
|
||||||
|
For detailed usage, Please refer to the documentation of pre-commit_.
|
||||||
|
|
||||||
|
.. _pre-commit: http://www.pre-commit.com/
|
||||||
|
|
||||||
|
Common Problems For Windows Users
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
1. ``/usr/bin/env: python: Permission denied.``
|
||||||
|
|
||||||
|
If you're in Git Bash or MSYS terminal, please check the python executable location by run ``which python``.
|
||||||
|
|
||||||
|
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 ``PATH`` environment variable.
|
1
docs/zh_CN/contribute/install-pre-commit-hook.rst
Normal file
1
docs/zh_CN/contribute/install-pre-commit-hook.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.. include:: ../../en/contribute/install-pre-commit-hook.rst
|
Reference in New Issue
Block a user