-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Pylint not working when language server is on #7314
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
Comments
We'll need to triage this. If this is indeed a bug, then it's a regression and will need to be labeled accordingly. |
If
Why do we have this behaviour? Double-checked, stepping through the code without having |
this should flip the user setting for pylint to be disabled, instead of disregarding it. |
Based on my recollection, this isn't what was requested. |
The problem is that if pylint is enabled in the user setting, it shouldn't require users to explicitly set it on the workspace setting for it to work. So we should make that transparent by changing the user setting accordingly. |
This is how it has always worked and was always the problem. Anyways, we can change this. |
I am not sure what is meant by "this is how it has always worked"? As I understand it, the issue is that in the VSCode settings, the "Python > Linting: Pylint Enabled" checkbox is checked by default, but pylint is not actually enabled. So there is a discrepancy between what the Settings page shows and what the actual state of the settings is Additionally, unchecking and re-checking the checkbox does not enable pylint ( |
Yes, I agree with that.
This is actually controlled by VS Code: microsoft/vscode#58038 |
This was reported before in #3292. |
Enabling Python Language Server seems to disable pylint? microsoft/vscode-python#7314
@darrickyee Same observations here. I reproduced your bug and the behaviour is same. Unless you declare your changes in .vscode > settings.json, checkbox is not registered by the extension. E.g. - pylint is enabled in both user and workspace settings by default but I also have to declare
in settings.json to enable pylint. |
I am unable to get pylint to work in vscode
My settings file looks like
Running linting does nothing Can you please help me get this working? |
Linting with bandit works Pylint is installed, as can be seen
Language server enabled, using Microsoft Settings file does not seem to reference correct application settings, not sure if this is another bug?
|
Okay I somehow understand the problem, but why is it a problem now? two or three updates before 1.49.1 I setted up my |
I seem to have the same problem but with Here is what I get when I run the command that vscode is running :
|
@shadycuz I believe the syntax would be |
@luabud that code is what visual studio code is running when I run the lint command. I don't see an error in the logs but I do see the command with no output. I'm not sure if the quotes are actually missing or if they were stripped because of weird log/shell stuff. I'll probably open my own issue. |
Do you have any settings defined for flake8 on your settings.json? In any case please do open a separate issue 😊 it will be easier to investigate what is going on. Thanks! |
Verified fixed in main. |
@karthiknadig Can you show how a user can receive this fix? I do not see you reference a commit hash, release etc. The quoting issue still affects me on VS Code 1.61.1, inside an Alpine Linux dev container, with Python extension v2021.10.1336267007, based on the logs.
|
@sanmai-NL this issue is about language server and pylint, not really about the results from pylint. You may need to file a separate issue for that. Previously, we only had either linter messages or messages for LS (because we did not run pylint at all if LS was enabled). With this change, if both linter and ls are enabled you get messages for both. The change itself is not referred here directly because this issue was a side effect of how we were handling linting. |
Uh oh!
There was an error while loading. Please reload this page.
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Language ServerExpected behaviour
Having linting, pylint and LS enabled in user settings should provide linting messages from both pylint and the LS.
Actual behaviour
Only LS is displaying linting messages. In order to get pylint to work, the workaround is to explicitly enable it in the workspace settings.
Steps to reproduce:
Enable pylint in the user settings, and make sure linting and the LS are enabled.
Write a piece of code wrongly and notice that only the LS will display linting messages. We'd expect pylint to work as well.
cc @Anapo14
The text was updated successfully, but these errors were encountered: