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
+12-18Lines changed: 12 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -370,26 +370,20 @@ Running Locally with Docker
370
370
371
371
7. View the docs at http://docs.djangoproject.localhost:8000/.
372
372
373
-
Pre-commit checks
374
-
-----------------
373
+
git hooks
374
+
---------
375
+
`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.
375
376
376
-
`pre-commit <https://pre-commit.com>`_ is a framework for managing pre-commit
377
-
hooks. These hooks help to identify simple issues before committing code for
378
-
review. By checking for these issues before code review it allows the reviewer
379
-
to focus on the change itself, and it can also help to reduce the number of CI
380
-
runs.
377
+
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.
381
378
382
-
To use the tool, first install ``pre-commit`` and then the git hooks
379
+
\- quoted from `prek's README.md <https://github.com/j178/prek/blob/ee7110b49bb1aa8d7b3ccee51c5241550cb0aec2/README.md>`_
383
380
384
-
.. code-block:: console
381
+
To use git hooks locally, first install ``prek`` and then the git hooks:
385
382
386
-
$ python3 -m pip install pre-commit
387
-
$ python3 -m pre_commit install
383
+
* Depending on your choice of platform and tooling, you can use the related installation instructions from https://prek.j178.dev/installation/
384
+
* Install git hooks using ``prek install`` command: https://prek.j178.dev/cli/#prek-install
388
385
389
-
On the first commit ``pre-commit`` will install the hooks, these are
390
-
installed in their own environments and will take a short while to
391
-
install on the first run. Subsequent checks will be significantly faster.
392
-
If the an error is found an appropriate error message will be displayed.
393
-
If the error was with ``isort`` then the tool will go ahead and fix them for
394
-
you. Review the changes and re-stage for commit if you are happy with
395
-
them.
386
+
The installed hooks will be triggered during each commit, or can be manually triggered via
387
+
``prek run`` command: https://prek.j178.dev/cli/#prek-run If an error is found an appropriate
388
+
error message will be displayed. If the error was with ``isort`` then the tool will go ahead
389
+
and fix them for you. Review the changes and re-stage for commit if you are happy with them.
0 commit comments