-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add pre-commit guide in README #6991
Conversation
Codecov Report
@@ Coverage Diff @@
## development #6991 +/- ##
===============================================
- Coverage 66.55% 60.55% -6.00%
===============================================
Files 303 259 -44
Lines 15499 12872 -2627
===============================================
- Hits 10315 7795 -2520
+ Misses 5184 5077 -107
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid Instructions
README.md
Outdated
**Introduction** | ||
|
||
Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks. | ||
|
||
### Quick Start | ||
|
||
#### 1. Add a pre-commit configuration ¶ | ||
|
||
* create a file named .pre-commit-config.yaml | ||
* you can generate a very basic configuration using pre-commit sample-config | ||
|
||
#### 2. Install the git hook scripts ¶ | ||
* run pre-commit install to set up the git hook scripts | ||
```sh | ||
$ pre-commit install | ||
pre-commit installed at .git/hooks/pre-commit | ||
``` | ||
* now pre-commit will run automatically on git commit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to document about configuring
. This is for Setup, which is already there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even for documenting configuration, I think pasting the link https://pre-commit.com
is enough. @iamareebjamal What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should still document pre-commit install
README.md
Outdated
## Pre-commits guide | ||
|
||
**Introduction** | ||
|
||
Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks. | ||
|
||
### For installation and configuration, [Click Here](https://pre-commit.com/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#6991 (comment).
Plus, I don't think this is a good place in the documentation for the Pre-commits guide. Include it in the development section.
Hi, let me re-iterate what is the requirement of this PR. That's it |
README.md
Outdated
|
||
**Introduction** | ||
|
||
Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add the introduction as well.
Fixes #6862
Short description of what this resolves:
A quick guide to configure pre-commits on Local Installation.
Checklist
development
branch.