doc: Add steps to set up git hook

Provide steps to install and set up
git hook locally.

Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
Yug 2020-08-19 18:10:42 +05:30 committed by mergify[bot]
parent 6287f6c6ec
commit 78c1e781be

View File

@ -34,7 +34,20 @@ it is **highly** encouraged to:
* Fork the [ceph-csi repo](https://github.com/ceph/ceph-csi) on Github. * Fork the [ceph-csi repo](https://github.com/ceph/ceph-csi) on Github.
* Add your fork as a git remote: * Add your fork as a git remote:
`$ git remote add fork https://github.com/<your-github-username>/ceph-csi` `$ git remote add fork https://github.com/<your-github-username>/ceph-csi`
* Set up a pre-commit hook to catch issues locally.
`$ pip install pre-commit==2.5.1`
`$ pre-commit install`
See the [pre-commit installation
instructions](https://pre-commit.com/#installation) for more
details.
Pre-commit will be now be triggered next time we commit changes.
This will catch some trivial style nitpicks (if any),
which will then need resolving. Once the warnings are resolved,
the user will be allowed to proceed with the commit.
> Editors: Our favorite editor is vim with the [vim-go](https://github.com/fatih/vim-go) > Editors: Our favorite editor is vim with the [vim-go](https://github.com/fatih/vim-go)
> plugin, but there are many others like [vscode](https://github.com/Microsoft/vscode-go) > plugin, but there are many others like [vscode](https://github.com/Microsoft/vscode-go)