Skip to content

Commit 824e442

Browse files
author
Aleksey Petryankin
committed
Add docs for new options providing per-directory configuration
1 parent 266c0fa commit 824e442

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

doc/user_guide/configuration/all-options.rst

+18
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,20 @@ Standard Checkers
216216
**Default:** ``False``
217217

218218

219+
--use-local-configs
220+
"""""""""""""""""""
221+
*When some of the linted files or modules have pylint config in the same directory, use their local configs for checking these files.*
222+
223+
**Default:** ``False``
224+
225+
226+
--use-parent-configs
227+
""""""""""""""""""""
228+
*Search for local pylint configs up until current working directory or root.*
229+
230+
**Default:** ``False``
231+
232+
219233

220234
.. raw:: html
221235

@@ -285,6 +299,10 @@ Standard Checkers
285299
286300
unsafe-load-any-extension = false
287301
302+
use-local-configs = false
303+
304+
use-parent-configs = false
305+
288306
289307
290308
.. raw:: html

doc/whatsnew/fragments/618.feature

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Add 2 new command line options: use-local-configs and use-parent-configs.
2+
3+
use-local-configs enables searching for local pylint configurations in the same directory where linted file is located.
4+
For example:
5+
if there exists package/pylintrc, then
6+
pylint --use-local-configs=y package/file.py
7+
will use package/pylintrc instead of default config from $PWD.
8+
9+
use-parent-configs enables searching for local pylint configurations upwards from the directory where linted file is located.
10+
For example:
11+
if there exists package/pylintrc, and doesn't exist package/subpackage/pylintrc, then
12+
pylint --use-local-configs=y --use-parent-configs=y package/subpackage/file.py
13+
will use package/pylintrc instead of default config from $PWD.
14+
15+
Closes #618

0 commit comments

Comments
 (0)