File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 1
1
- id : sphinx-lint
2
- name : Sphinx lint
3
- description : ' Searches for common typos in sphinx-flavored rst files.'
4
- files : ' \.rst$'
2
+ name : Sphinx Lint
3
+ description : ' Searches for common problems in Sphinx-flavored reST files'
4
+ types : [rst]
5
+ # Defer to pre-commit on the best way to delegate resources across available cores
6
+ args : [--jobs=1]
5
7
entry : sphinx-lint
6
8
language : python
7
-
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ CPython](https://github.com/python/cpython/blob/e0433c1e7/Doc/tools/rstlint.py).
12
12
13
13
## What is Sphinx Lint, what is it not?
14
14
15
- ` sphinx-lint ` should:
15
+ Sphinx Lint should:
16
16
17
17
- be reasonably fast so it's comfortable to use as a linter in your editor.
18
18
- be usable on a single file.
@@ -23,7 +23,7 @@ CPython](https://github.com/python/cpython/blob/e0433c1e7/Doc/tools/rstlint.py).
23
23
24
24
## Using Sphinx Lint
25
25
26
- To use Sphinx Lint, run :
26
+ Here are some example invocations of Sphinx Lint from the command line :
27
27
28
28
``` sh
29
29
sphinx-lint # check all dirs and files
@@ -41,17 +41,8 @@ We recommend using a configuration like this:
41
41
rev : LATEST_SPHINXLINT_RELEASE_TAG
42
42
hooks :
43
43
- id : sphinx-lint
44
- args : [--jobs=1]
45
- types : [rst]
46
44
` ` `
47
45
48
- In particular, note that the ` --jobs=1` flag is recommended for use with pre-commit.
49
- By default, Sphinx Lint uses `multiprocessing` to lint multiple files simultaneously,
50
- but this interacts poorly with pre-commit, which also attempts to use multiprocessing,
51
- leading to resource contention. Adding `--jobs=1` tells Sphinx Lint not to use
52
- multiprocessing itself, deferring to pre-commit on the best way to delegate resources
53
- across available cores.
54
-
55
46
56
47
## Known issues
57
48
You can’t perform that action at this time.
0 commit comments