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 11- 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]
57 entry : sphinx-lint
68 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).
1212
1313## What is Sphinx Lint, what is it not?
1414
15- ` sphinx-lint ` should:
15+ Sphinx Lint should:
1616
1717- be reasonably fast so it's comfortable to use as a linter in your editor.
1818- be usable on a single file.
@@ -23,7 +23,7 @@ CPython](https://github.com/python/cpython/blob/e0433c1e7/Doc/tools/rstlint.py).
2323
2424## Using Sphinx Lint
2525
26- To use Sphinx Lint, run :
26+ Here are some example invocations of Sphinx Lint from the command line :
2727
2828``` sh
2929sphinx-lint # check all dirs and files
@@ -41,17 +41,8 @@ We recommend using a configuration like this:
4141 rev : LATEST_SPHINXLINT_RELEASE_TAG
4242 hooks :
4343 - id : sphinx-lint
44- args : [--jobs=1]
45- types : [rst]
4644` ` `
4745
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-
5546
5647## Known issues
5748
You can’t perform that action at this time.
0 commit comments