Skip to content

Commit 8401ea6

Browse files
authored
Mention linting (#11445)
* Mention linting * Fix whitespace that the linter doesnt catch * Review fixes
1 parent d406770 commit 8401ea6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/dev/style-guide.rst

+15
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ Content
4949
* ``:guilabel:`<your username>` dropdown``
5050
* Make sure that **all bullet list items end with a period**, and don't mix periods with no periods.
5151

52+
Linting
53+
~~~~~~~
54+
55+
ReStructuredText for both the RTD user documentation and this developer documentation is linted with `pre-commit` for broken links,
56+
whitespace consistency, and other minor issues.
57+
58+
You can fix many linting issues automatically by installing and running `pre-commit` locally.
59+
To run it on content you have have already committed, use the ``--from-ref`` and ``--to-ref`` `flags <https://pre-commit.com/#pre-commit-run>`__.
60+
61+
.. code-block:: bash
62+
63+
pre-commit run --from-ref <OLDER_COMMIT> --to-ref <RECENT_COMMIT>
64+
65+
Or use ``pre-commit run --all-files`` to lint all files.
66+
5267
Word list
5368
---------
5469

0 commit comments

Comments
 (0)