Skip to content

Commit

Permalink
[DOCS] Add information on pre-commit to docs/setup/compile.md (#1363)
Browse files Browse the repository at this point in the history
* [DOCS] Add information on pre-commit to `docs/setup/compile.md`

* Update docs/setup/compile.md

* Fix up more
  • Loading branch information
jbampton committed Apr 25, 2024
1 parent ce62a85 commit 1049ced
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/setup/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 1049ced

Please sign in to comment.