-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement linting on change #408
Comments
Please update #313 to point to this issue instead, so that people can vote for it. |
@kav2k you can leave a comment referencing this issue if you want; there shouldn't be anything requiring special privileges to do so. |
Plus, it would make sense to edit the issue text, as it explicitly says "please add your vote 👍 against the following issue #28." |
@kav2k I removed the mention in the other issue. |
I'll just point out that PyCharm, atom, and sublime already have this. Most language packages for VSCode also have it. So this is really an outlier in terms of missing functionality. |
PS: since I cant comment on #313... It advises:
As far as I can tell
This is kind of crazy to me. I have to have my file write to disk every second in order to get linting while I write? I will echo @malmaud on pointing out that this doesn't seem to be a "luxury" setting for most other languages/editors. It was quite surprising to me when I encountered this in this extension. However, please don't misunderstand my tone: I am VERY thankful for your work so far and would like to point out that having python so well supported for the most part in VS Code was what allowed me to finally leave Atom. It have for the MOST part been a spectacular change. So thanks. |
This will be done via integration of Python analysis engine from Visual Studio. You can track the project here https://github.com/Microsoft/vscode-python/projects/7#card-8034268 |
@MikhailArkhipov, any news on this? |
The effort I believe is tracked in https://github.com/Microsoft/vscode-python/projects/7 but it seems that while the development proceeds at a steady pace, new issues appear at the same rate. I wonder whether there already is a somehow-working prototype? |
It's still being actively worked on as @stlaz pointed out. It should be hitting limited preview "soon" 😉 . Keep an eye on https://aka.ms/pythonblog for our release notes to know when we're ready to have the public play with it and give us feedback. |
Just wanted to add my encouragement for this feature. Was thinking about switching to VS Code after an impressive demo from a buddy, but not being able to live-lint Python is a blocker for me. Best wishes to you all working on this. |
@boojum no update to speak of. We do our dev and spec work in the open so when there's something to update it will be on this issue. |
This comment has been minimized.
This comment has been minimized.
"python.jediEnabled": false now gives a warning "Unknown Configuration Setting," is that workaround no longer functional? |
@jonahpearl that setting was dropped months ago; to turn off auto-complete you want |
It is |
I guess the lint on text change should be default like TS files. I hope vs-code provides the same for python. I mean developer won't turn on With linters like mypy this is a real deal-breaker. Some Thoughts:
Since I moved from Sublime this is the first point I disappointed from vs-code. I hope this gets implemented in vs-code because if you are not getting linting while you are doing static typing, static typing doesn't matter I guess. Regards. |
It appears that the internal implementation is on an indefinite halt. Can this functionality be implemented by another extension by some chance? I, too, don't consider auto-saving a good alternative. |
@fusion-a yes, if you wanted to write your own extension to implement something because we are not moving fast enough then you certainly can; we have no special access to APIs or anything, so anything we can do anyone can do. |
Is there any extension that implements this? This is a very basic functionality that is missing |
@Gabriel-p I'm personally not aware of any, but we have started researching this ourselves. It very well might mean we end up with separate extensions for each linter, though. |
Hi everyone, any news since September? Did anyone find another extension for this? |
Our first linter extension got announced as part of the VS Code 1.66 release: https://github.com/microsoft/vscode-pylint . If performance holds up we can consider adding this feature there. You can also turn on auto-save and that will also trigger the linter more-or-less as you type. |
I'm still pretty new at all of this stuff so I don't know if it's appropriate to add this here, but I didn't see mention in thread yet: cornflakes, the flake8 plugin, does have lintOnType, and might be a useful reference. |
@NireBryce are you talking about https://marketplace.visualstudio.com/items?itemName=kevinglasson.cornflakes-linter ? |
yep -- cornflakes' lint-on-type works and has for at least a year. I don't know how it performs on larger projects, but right now it's a pretty imperceptible delay It breaks a bit on jupyter notebooks in the notebook view, but .py files with #%% at the top work fine |
I encourage folks to check out #408 (comment) and see if it works for them. |
Linting on change has be added to Ruff linter (which has pylint, flake8, bandit, pycodestyle, pydocstyle rules) also supports this: https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff |
Now that we are dropping support for the built-in linting features, we will leave it up to each linting extension to support linting on change. Hence closing this. |
As per this comment in #28, a new feature request:
Actually implement
python.linting.lintOnTextChange
, to apply linting to the unsaved buffer.This is a desirable, if nontrivial, function.
See also #313 - if this is implemented, that should be reversed.
The text was updated successfully, but these errors were encountered: