Skip to content

Commit

Permalink
ci: add configuration for commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Izquierdo committed Oct 5, 2023
1 parent 0cb7dc0 commit d67ee8e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ repos:
rev: v9.5.0
hooks:
- id: commitlint
additional_dependencies: ['@commitlint/config-conventional']
stages: [commit-msg]
4 changes: 3 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [2, 'always', '*'],
'body-max-line-length': [2, 'always', Infinity],
'subject-case': [0, 'always', 'lower-case'],
'body-case': [0, 'always', 'lower-case'],
},
};
7 changes: 6 additions & 1 deletion docs/development_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ To get flake8 and tox, just pip install them into your virtualenv.
7. Commit your changes and push your branch to GitHub:
We follow the conventionalcommit_ standards for commit message
During the pre-commit phase we will validate the commit message
You have to install the hook with the following command:

.. _conventionalcommit : https://www.conventionalcommits.org/en/v1.0.0/
.. code-block:: console
pre-commit install --hook-type commit-msg
.. _conventionalcommit : https://www.conventionalcommits.org/en/v1.0.0/

.. code-block:: console
Expand Down

0 comments on commit d67ee8e

Please sign in to comment.