@@ -22,18 +22,20 @@ command line options for this hook:
22
22
23
23
$ python -m numpydoc.hooks.validate_docstrings --help
24
24
25
- Using a config file provides additional customization. Both
26
- ``pyproject.toml `` and ``setup.cfg `` are supported; however, if the
27
- project contains both you must use the ``pyproject.toml `` file.
28
- The example below configures the pre-commit hook to ignore three checks
25
+ Using a config file provides additional customization. Both ``pyproject.toml ``
26
+ and ``setup.cfg `` are supported; however, if the project contains both
27
+ you must use the ``pyproject.toml `` file. The example below configures
28
+ the pre-commit hook to ignore three checks (using the same logic as the
29
+ :ref: `validation during Sphinx build <_validation_during_sphinx_build >`)
29
30
and specifies exceptions to the checks ``SS05 `` (allow docstrings to
30
31
start with "Process ", "Assess ", or "Access ") and ``GL08 `` (allow
31
32
the class/method/function with name "__init__" to not have a docstring).
32
33
33
34
``pyproject.toml ``::
34
35
35
36
[tool.numpydoc_validation]
36
- ignore = [
37
+ checks = [
38
+ "all", # run all checks, except the below
37
39
"EX01",
38
40
"SA01",
39
41
"ES01",
@@ -44,7 +46,7 @@ the class/method/function with name "__init__" to not have a docstring).
44
46
``setup.cfg ``::
45
47
46
48
[tool:numpydoc_validation]
47
- ignore = EX01,SA01,ES01
49
+ checks = all, EX01,SA01,ES01
48
50
override_SS05 = ^((Process|Assess|Access) )
49
51
override_GL08 = ^(__init__)$
50
52
@@ -96,6 +98,8 @@ For an exhaustive validation of the formatting of the docstring, use the
96
98
incorrect capitalization, wrong order of the sections, and many other
97
99
issues.
98
100
101
+ .. _validation_during_sphinx_build
102
+
99
103
Docstring Validation during Sphinx Build
100
104
----------------------------------------
101
105
0 commit comments