From 78c1e781beaa36f8a634bd6ce37ba28e2505b7bc Mon Sep 17 00:00:00 2001 From: Yug Date: Wed, 19 Aug 2020 18:10:42 +0530 Subject: [PATCH] doc: Add steps to set up git hook Provide steps to install and set up git hook locally. Signed-off-by: Yug --- docs/development-guide.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/development-guide.md b/docs/development-guide.md index 309b095cb..7436247d7 100644 --- a/docs/development-guide.md +++ b/docs/development-guide.md @@ -34,7 +34,20 @@ it is **highly** encouraged to: * Fork the [ceph-csi repo](https://github.com/ceph/ceph-csi) on Github. * Add your fork as a git remote: `$ git remote add fork https://github.com//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) > plugin, but there are many others like [vscode](https://github.com/Microsoft/vscode-go)