Closed OlenaYefymenko closed 1 year ago
@OlenaYefymenko also, Git allows working on multiple things simultaneously. To practice this, start working on #13 and send another PR in parallel.
Thank you for providing such detailed feedback. I will take all aspects into consideration and make the necessary fixes.
The pull request (PR) introduces configuration settings for pre-commit. Using Git hook scripts is a practical way to catch simple issues early on, before submitting code for review. These scripts automatically run on every commit and can flag problems such as missing semicolons, trailing whitespace, and debug statements. This approach saves time for code reviewers, who can then focus on higher-level aspects of a change instead of wasting time on minor style issues.
Resolves #12
.pre-commit-config.yaml
After installing the new pre-commit hooks, you can verify that they are working correctly by running the command pre-commit run --all-files
@webknjaz
@OlenaYefymenko don't post that as a comment, edit the PR title and description.
Also, there's review request button in the sidebar and some other places, use those. Comments are for discussions, they don't update those fields automatically.
Also, update the commit message with the new details, you need to use Git for that.
Pre-commit hooks enable checking automatically the Git repository before each commit
Only if one integrates the tool into git or runs it manually. This PR does not make it automatic or integrated with Git in any way.
Only if one integrates the tool into git or runs it manually. This PR does not make it automatic or integrated with Git in any way
@webknjaz thank you for feedback, I edited it.
You're integrating various checks but they are not hooks.
You're integrating various checks but they are not hooks.
Yes, only part of them refers to "hooks". Therefore, I assume that the title of PR should be "Integrate pre-commit into project" (pre-commit - broader concept). In description, I will write: "Settings the pre-commit will enable files inspection before committing. The check includes the following: ...
I'd suggest "pre-commit tool" since just "pre-commit" is ambiguous and thus could be misleading.
"hooks" is an internal concept of the pre-commit tool. But when used without clarification, one might think that the term is referring to Git when it does not.
But when used without clarification, one might think that the term is referring to Git when it does not.
If I understood you correctly. When used “hooks” without clarification, one might think about this .git/hooks
Yep
All the necessary changes were made. Merged to main
All the necessary changes were made. Merged to main
No, you didn't. You just closed the PR and re-opened it back again... You'll be able to merge once the in-diff conversations are marked as resolved.
No, you didn't. You just closed the PR and re-opened it back again... You'll be able to merge once the in-diff conversations are marked as resolved.
I understand it. Yes, it was a misstep
Settings the pre-commit tool will enable files inspection before committing. The check includes the following:
no-commit-to-branch
,check-merge-conflict
)add-trailing-comma
,remove-tabs,
trailing-whitespace
,double-quote-string-fixer
)check-docstring-first
,end-of-file-fixer
,check-ast
,name-tests-test
)check-yaml
,check-xml
)flake8
,pydocstyle
,pylint
,mypy
)More details at https://pre-commit.com/hooks.html
Resolves #12