File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,37 @@ CPython](https://github.com/python/cpython/blob/e0433c1e7/Doc/tools/rstlint.py).
21
21
- focus on finding errors that are ** not** visible to sphinx-build.
22
22
23
23
24
+ ## Using Sphinx Lint
25
+
26
+ To use Sphinx Lint, run:
27
+
28
+ ``` sh
29
+ sphinx-lint # check all dirs and files
30
+ sphinx-lint file.rst # check a single file
31
+ sphinx-lint docs # check a directory
32
+ sphinx-lint -i venv # ignore a file/directory
33
+ sphinx-lint -h # for more options
34
+
35
+ Sphinx Lint can also be used via [pre-commit](https://pre-commit.com).
36
+ We recommend using a configuration like this:
37
+
38
+ ` ` ` yaml
39
+ - repo: https://github.com/sphinx-contrib/sphinx-lint
40
+ rev: LATEST_SPHINXLINT_RELEASE_TAG
41
+ hooks:
42
+ - id: sphinx-lint
43
+ args: [--jobs= 1]
44
+ types: [rst]
45
+ ` ` `
46
+
47
+ In particular, note that the ` --jobs=1` flag is recommended for use with pre-commit.
48
+ By default, Sphinx Lint uses ` multiprocessing` to lint multiple files simultaneously,
49
+ but this interacts poorly with pre-commit, which also attempts to use multiprocessing,
50
+ leading to resource contention. Adding ` --jobs=1` tells Sphinx Lint not to use
51
+ multiprocessing itself, deferring to pre-commit on the best way to delegate resources
52
+ across available cores.
53
+
54
+
24
55
# # Known issues
25
56
26
57
Currently Sphinx Lint can' t work with tables, there' s no understanding
You can’t perform that action at this time.
0 commit comments