From 476b448640d9f6d006b70aac7f6b96ab2119b10a Mon Sep 17 00:00:00 2001 From: DmGorokhov Date: Mon, 6 Nov 2023 14:48:21 +0300 Subject: [PATCH] [#321] add description of work of pre-commit hooks in CONTRIBUTING.md --- CONTRIBUTING.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb0b4dcb..ccbbb3c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,8 +8,14 @@ 6. Make changes 7. Checkout Makefile or README.md for commands like `make check` `make lint` `make test` 8. Run tests and linters (`make check`) -10. Commit your changes (`git commit -am 'Added some feature'`) -11. Push to the branch (`git push origin my-new-feature`) -12. Create new Pull Request -13. Check if Request passed GithubActions -14. Wait, until PR is reviewed +9. Commit your changes (`git commit -am 'Added some feature'`) +*When you install a project, scripts for pre-commit hooks are added to the .git folder. +When you make your first commit, you will see the environment setting for the hooks in the terminal. +This is normal behavior and will only happen on your first commit. In general, you will see in the terminal +the status of checks for pre-commit hooks. Some hooks will make edits automatically and clean files will be +added to the commit. Some (e.g. flake8) will display errors in the terminal and abort the commit to fix +them. In this case, fix the errors and try to commit again. You can read more about pre-commit hooks [here](https://pre-commit.com/).* +10. Push to the branch (`git push origin my-new-feature`) +11. Create new Pull Request +12. Check if Request passed GithubActions +13. Wait, until PR is reviewed