Automatically respect .pylintrc files in subdirectories
See original GitHub issueEnvironment data
VS Code version: 1.19.0 Python Extension version: 0.9.0 (14 December 2017) Python Version: 3.6.1 OS and version: Windows 10 Home, Version 1703, OS-version 15063.483
Actual behavior
.pylintrc files in a directory in the workspace are not automatically found by pylint
Expected behavior
- .pylintrc files found in a directory should be automatically respected for that folder and all sub-directories.
- New .pylintrc files in sub-directories should take precedence over parent directories .pylintrc files
This is how it works when running the pylint command via terminal. .pylintrc files are automatically respected without supplying them specifically via the option --rcfile
Note that I am unsure if other options are respected as defined here https://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options
Steps to reproduce:
- Create a .pylintrc file in a directory in the workspace and notice how the rules defined are not respected
Issue Analytics
- State:
- Created 6 years ago
- Reactions:58
- Comments:26 (2 by maintainers)
Top Results From Across the Web
Automatically respect .pylintrc files in subdirectories #442
Expected behavior .pylintrc files found in a directory should be automatically respected for that folder and all sub-directories. New .pylintrc ...
Read more >VSCode Python Linting .pylintrc in repository vs workspace root
I want the linter to use the file under the folder repo folder from where the .py file is opened. python · visual-studio-code...
Read more >Pylint Documentation - Read the Docs
Pylint is a tool that checks for errors in Python code, tries to enforce a coding standard and looks for code smells. It....
Read more >Running Pylint - Pylint 2.16.0-dev documentation
pylint --recursive=y mydir mymodule mypackage ... should always work since the current working directory is automatically added on top of the python path....
Read more >Run Pylint for all Python files in a directory and all subdirectories
PYTHON : Run Pylint for all Python files in a directory and all subdirectories [ Gift : Animated Search Engine ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also having this issue. However, I’ve been able to workaround it by using the
python.linting.pylintArgs
setting to explicitly point to the.pylintrc
fileBtw… this issue seems related to https://github.com/DonJayamanne/pythonVSCode/issues/117
This is surprising behavior! Especially in larger repositories or monorepos, it’s likely that different pylint standards will be applied to different parts of the directory tree or even to submodules. For example, you might want to enforce the existence of module-level docstrings in a library, but not in test files.