Skip to content

Commit

Permalink
[Hexlet#321] after code review left only flake8 pre-commit hook
Browse files Browse the repository at this point in the history
modified  description of work of pre-commit hooks in CONTRIBUTING.md
  • Loading branch information
DmGorokhov committed Dec 6, 2023
1 parent 476b448 commit 838bcd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
18 changes: 0 additions & 18 deletions .pre-commit-config.yaml
@@ -1,23 +1,5 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Expand Up @@ -9,12 +9,12 @@
7. Checkout Makefile or README.md for commands like `make check` `make lint` `make test`
8. Run tests and linters (`make check`)
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/).*
* "When you install a project, scripts for the flake8 pre-commit hooks are added to the .git folder.
When you make your first commit, you will see the environment settings for the pre-commit hook displayed
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 the flake8 check for the pre-commit hook.
In case of linter errors, they will be displayed in the
terminal and abort the commit to fix them. If there are any errors, fix these 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
Expand Down

0 comments on commit 838bcd8

Please sign in to comment.