8000 DOC: Add pre-commit hook run dev instructions · matplotlib/matplotlib@48ade7d · GitHub
[go: up one dir, main page]

Skip to content

Commit 48ade7d

Browse files
DOC: Add pre-commit hook run dev instructions
Add instructions to the devs on how to manually run pre-commit hooks, both for all the hooks, and for individual hook ids. Example: `pre-commit run flake8 --all-files` Also use the 'python -m pip' pattern to be consistent with the rest of the docs.
1 parent 4c00377 commit 48ade7d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/devel/development_setup.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,18 @@ These will automatically check flake8 and other style issues when you run
AFDA
6767
``git commit``. The hooks are defined in the top level
6868
``.pre-commit-config.yaml`` file. To install the hooks ::
6969

70-
pip install pre-commit
70+
python -m pip install pre-commit
7171
pre-commit install
7272

73+
The hooks can also be run manually. All the hooks can be run, in order as
74+
listed in ``.pre-commit-config.yaml``, against the full codebase with ::
75+
76+
pre-commit run --all-files
77+
78+
To run a particular hook manually, run ``pre-commit run`` with the hook id ::
79+
80+
pre-commit run <hook id> --all-files
81+
7382
Installing additional dependencies for development
7483
==================================================
7584
See :ref:`development-dependencies`.

0 commit comments

Comments
 (0)
0