Skip to content

Commit

Permalink
Adapt developer guides with pre-commit use
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and github-actions[bot] committed Nov 30, 2024
1 parent d6dbdcd commit 14cf601
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions docs/developers_guide/git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,15 @@ Procedure
Code your changes in your local disk with your usual IDE.
Remember to write tests suite for your modifications, when appropriate.

#. Proper formatting and spell check
Make sure your code is properly formatted and spelled by running the prepare commit script
**before** issuing ``git commit``.
#. Proper formatting, spell check, and code quality control

.. code-block:: bash
./scripts/prepare_commit.sh
Proper formatting, spell check, and code quality control are managed from a pre-commit git hook.

This can be automated by adding it to a pre-commit hook, for example:
This can be automated by running:

.. code-block:: bash
# check if a pre-commit already exists and backup it
test -e .git/hooks/pre-commit && mv .git/hooks/pre-commit pre-commit.000
# copy prepare_commit.sh as new pre-commit hook
cp ./scripts/prepare_commit.sh .git/hooks/pre-commit
pre-commit install
The spell checker script can also be run alone with:

Expand Down

0 comments on commit 14cf601

Please sign in to comment.