This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 1049ced8e [DOCS] Add information on pre-commit to
`docs/setup/compile.md` (#1363)
1049ced8e is described below
commit 1049ced8e1e76fd8008dd471a8f08e1a97585f4a
Author: John Bampton <[email protected]>
AuthorDate: Thu Apr 25 13:39:21 2024 +1000
[DOCS] Add information on pre-commit to `docs/setup/compile.md` (#1363)
* [DOCS] Add information on pre-commit to `docs/setup/compile.md`
* Update docs/setup/compile.md
* Fix up more
---
docs/setup/compile.md | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/docs/setup/compile.md b/docs/setup/compile.md
index 52399aa9b..7d2fd8d96 100644
--- a/docs/setup/compile.md
+++ b/docs/setup/compile.md
@@ -158,3 +158,25 @@ mkdocs build
mike deploy --update-aliases latest-snapshot -b website -p
mike serve
```
+
+## pre-commit
+
+We run [pre-commit](https://pre-commit.com/) with GitHub Actions so
installation on
+your local machine is currently optional.
+
+The pre-commit [configuration
file](https://github.com/apache/sedona/blob/master/.pre-commit-config.yaml)
+is in the repository root. Before you can run the hooks, you need to have
pre-commit installed.
+
+The hooks run when running `git commit`. Some of the hooks will auto fix the
code after the hook fails
+whilst most will print error messages from the linters.
+
+If you want to test all hooks against all files and when you are adding a new
hook
+you should always run:
+
+`pre-commit run --all-files`
+
+Sometimes you might need to skip a hook to commit for example:
+
+`SKIP=markdownlint git commit -m "foo"`
+
+We have a [Makefile](https://github.com/apache/sedona/blob/master/Makefile) in
the repository root which has three pre-commit convenience commands.