Skip to content

Commit

Permalink
Add docs for new options providing per-directory configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Petryankin committed Feb 2, 2024
1 parent 592f107 commit 98e525f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/user_guide/configuration/all-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,20 @@ Standard Checkers
**Default:** ``False``


--use-local-configs
"""""""""""""""""""
*When some of the linted files or modules have pylint config in the same directory, use their local configs for checking these files.*

**Default:** ``False``


--use-parent-configs
""""""""""""""""""""
*Search for local pylint configs up until current working directory or root.*

**Default:** ``False``



.. raw:: html

Expand Down Expand Up @@ -285,6 +299,10 @@ Standard Checkers
unsafe-load-any-extension = false
use-local-configs = false
use-parent-configs = false
.. raw:: html
Expand Down
15 changes: 15 additions & 0 deletions doc/whatsnew/fragments/618.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Add 2 new command line options: use-local-configs and use-parent-configs.

use-local-configs enables searching for local pylint configurations in the same directory where linted file is located.
For example:
if there exists package/pylintrc, then
pylint --use-local-configs=y package/file.py
will use package/pylintrc instead of default config from $PWD.

use-parent-configs enables searching for local pylint configurations upwards from the directory where linted file is located.
For example:
if there exists package/pylintrc, and doesn't exist package/subpackage/pylintrc, then
pylint --use-local-configs=y --use-parent-configs=y package/subpackage/file.py
will use package/pylintrc instead of default config from $PWD.

Closes #618

0 comments on commit 98e525f

Please sign in to comment.