-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pylintrc not respected in subfolder #616
Comments
I'm being hit by this too, except in Emacs. From the logs:
The results of this command change depending on which directory it runs in. From /Users/jml: lots of errors, pylintrc not respected There's an
I guess you could make an argument that pylint (and other external processes) should be run from the project root as a matter of course, which would make this problem go away. |
@jml In my case the problem was a missing |
Ooh, that's a likely explanation. I haven't verified experimentally, but there are definitely directories missing |
Work around the issue palantir/python-language-server#616, which would be fixed by emacs-lsp/lsp-mode#928, but is not yet merged.
.pylintrc files aren't used for linting by pyls for the moment, the way you can configure pylint is by passing a list of arguments (the same arguments you would pass when using the pylint command line tool) like @jml said. In the vscode client you can update "pyls.plugins.pylint.args" to list your agruments in the vscode/package.json file. |
Yeah pylintrc is not respected anywhere for me. This issue seems to me to be a feature request for that (though the title should be edited) unless there is already another open issue I missed. |
@gatesn I think we should add support for pylint config files as it doesn't seem really obvious to pass config through "pyls.plugins.pylint.args". |
Yep, agree. I don’t think it should be too hard either since we shell out to pylint - so we should be able to have it discover it’s own config instead of parsing it ourselves |
@chthor the reason why it's not using the .pylintrc config in the subfolder is because pylint is ran under that exact subfolder which doesn't contain a .pylintrc. We should get this fixed by parsing the config file on startup and passing that config to every run of pylint as arguments. UPDATE: pylint isn't ran under that subfolder, but the fix should still make pylint have the same behavour while linting all project files. |
I have the following structure:
pylint is ok with both files:
I'm running Neovim with LanguageClient-Neovim.
The top-level
wtf.py
works as expected:But the subfolder version of
wtf.py
does not respect thepylintrc
. I get themissing-docstring
warning:Why does
pylintrc
not apply to the subfolder?The text was updated successfully, but these errors were encountered: