You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+11-17Lines changed: 11 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -349,26 +349,20 @@ Running Locally with Docker
349
349
350
350
docker compose run --rm web python -m manage test
351
351
352
-
Pre-commit checks
352
+
prek checks
353
353
-----------------
354
+
`pre-commit <https://pre-commit.com>`_ is a framework to run hooks written in many languages, and it manages the language toolchain and dependencies for running the hooks.
354
355
355
-
`pre-commit <https://pre-commit.com>`_ is a framework for managing pre-commit
356
-
hooks. These hooks help to identify simple issues before committing code for
357
-
review. By checking for these issues before code review it allows the reviewer
358
-
to focus on the change itself, and it can also help to reduce the number of CI
359
-
runs.
356
+
prek is a reimagined version of pre-commit, built in Rust. It is designed to be a faster, dependency-free and drop-in alternative for it, while also providing some additional long-requested features.
360
357
361
-
To use the tool, first install ``pre-commit`` and then the git hooks
358
+
Quoted from `prek's README.md <https://github.com/j178/prek/blob/ee7110b49bb1aa8d7b3ccee51c5241550cb0aec2/README.md>`_
362
359
363
-
.. code-block:: console
360
+
To use the tool, first install ``prek`` and then the git hooks:
364
361
365
-
$ python3 -m pip install pre-commit
366
-
$ python3 -m pre_commit install
362
+
* Depending on your choice of platform and tooling, you can use the related installation instructions from https://prek.j178.dev/installation/
363
+
* Install git hooks using ``prek install`` command: https://prek.j178.dev/cli/#prek-install
367
364
368
-
On the first commit ``pre-commit`` will install the hooks, these are
369
-
installed in their own environments and will take a short while to
370
-
install on the first run. Subsequent checks will be significantly faster.
371
-
If the an error is found an appropriate error message will be displayed.
372
-
If the error was with ``isort`` then the tool will go ahead and fix them for
373
-
you. Review the changes and re-stage for commit if you are happy with
374
-
them.
365
+
The installed hooks will be triggered during each commit, or can be manually triggered via
366
+
``prek run`` command: https://prek.j178.dev/cli/#prek-run If an error is found an appropriate
367
+
error message will be displayed. If the error was with ``isort`` then the tool will go ahead
368
+
and fix them for you. Review the changes and re-stage for commit if you are happy with them.
0 commit comments