From 0a7e31715526cf138fda65404fefaccf3a8c106e Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Sat, 3 Oct 2020 19:18:06 +0100 Subject: [PATCH] docs(pre-commit): add section explaining usage * Automated using https://github.com/myii/ssf-formula/pull/259 --- CONTRIBUTING.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 8fb8851..ab319df 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -55,6 +55,22 @@ So based on the example above: * The ``(scope):`` will be shown in bold text without the brackets. * The ``subject`` follows the ``scope`` as standard text. +pre-commit +^^^^^^^^^^ + +`pre-commit `_ is configured for this formula, which you may +optionally use to ease the steps involved in submitting your changes, including +checking the formatting of your commit messages. + +First install the ``pre-commit`` package manager locally using the appropriate +`method `_, then run ``bin/install-hooks`` in the +formula's root directory and now ``pre-commit`` will run automatically on each +``git commit``. :: + + $ bin/install-hooks + pre-commit installed at .git/hooks/pre-commit + pre-commit installed at .git/hooks/commit-msg + Linting commit messages in Travis CI ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^