You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: 3.6.3
OS and version: Ubuntu 17.10
On the linting setup, the documentation says than PyLint is activated by default and it provides some ways to configure the extension to work this package, specifically the documentation states than:
Options can also be specified in a pylintrc or .pylintrc file in the workspace folder...
But Pylint also allows the use of a setup.cfg file, which also is accepted as a repository for other Python modules configurations such as Flake8 and Coverage. Would be possible to add that option to the linting setup?
Have you tried to check whether this works?
It should work as long as pylint supports it and is able to automatically locate it based on its search rules.
Please could you confirm whether this works, if not please provide the following information:
Where is your setup.cfg file located with respect to your workspace
Where is the file you are linting located with respect to your workspace
Yes, PyLint and some additional Python packages are compatible with the setup.cfg file, but now than you mention, there is one thing, PyLint only detects automatically the .pylintrc file, to call the setup file you have to use the flag --rcfile=setup.cfg adding the working folder where you want run PyLint.
My setup.cfg file is inside the projects working directory.
I'm trying to lint the whole project, but the main content is inside a subfolder.
The content of my file is the next, I apologize but is long file but i think it is useful for you to have the info:
Sebastian Reyes Espinosa (@sebastian-code) so the issue is python.linting.pylintArgs: ["--rcfile=setup.cfg"] doesn't work when defined in one of your settings.json files?
Basically I'm trying to determine if there's a bug here or if you're asking we provide our own search algorithm for configuration files since Pylint itself only looks for a pylintrc file? (We currently don't do anything special at the moment, BTW.)
Ok, now i found it, well, actually it founded me, the issue is than it doesn't work right away but you need to restart to make it work (or wait a really long time, that works too). Thanks for your time, and I'm sorry I kept you busy with it.
Activity
DonJayamanne commentedon Jan 10, 2018
Have you tried to check whether this works?
It should work as long as pylint supports it and is able to automatically locate it based on its search rules.
Please could you confirm whether this works, if not please provide the following information:
sebastian-code commentedon Jan 10, 2018
Hi Don Jayamanne (@DonJayamanne) Thanks for the prompt answer.
Yes, PyLint and some additional Python packages are compatible with the
setup.cfgfile, but now than you mention, there is one thing, PyLint only detects automatically the.pylintrcfile, to call the setup file you have to use the flag--rcfile=setup.cfgadding the working folder where you want run PyLint.My
setup.cfgfile is inside the projects working directory.I'm trying to lint the whole project, but the main content is inside a subfolder.
The content of my file is the next, I apologize but is long file but i think it is useful for you to have the info:
sebastian-code commentedon Jan 10, 2018
I tried defining the
"python.linting.pylintArgs": []in the configuration file, but every time I add any of those flags, the linting stops working.brettcannon commentedon Jan 10, 2018
Sebastian Reyes Espinosa (@sebastian-code) so the issue is
python.linting.pylintArgs: ["--rcfile=setup.cfg"]doesn't work when defined in one of yoursettings.jsonfiles?Basically I'm trying to determine if there's a bug here or if you're asking we provide our own search algorithm for configuration files since Pylint itself only looks for a
pylintrcfile? (We currently don't do anything special at the moment, BTW.)sebastian-code commentedon Jan 10, 2018
To be honest, at this point I'm a little bit out of my league, so my question would be more of the likes of how I make it work?
sebastian-code commentedon Jan 10, 2018
Ok, now i found it, well, actually it founded me, the issue is than it doesn't work right away but you need to restart to make it work (or wait a really long time, that works too). Thanks for your time, and I'm sorry I kept you busy with it.
brettcannon commentedon Jan 10, 2018
No problem! We're just glad you got it working.