-
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
Run linter on all files in a workspace, even the unopened ones #3836
Comments
Duplicate of #82 |
@d3r3kk After reading the thread, I see that it was closed due to support being added in Python Language Server. I have that enabled and I am unable to get it to report LS problems in files that I don't have open. Is there something else I need to do? Additionally, there is still no way to run linters on the entire workspace. That problem was not resolved. |
I see, yes in that thread there is discussion about linting all files but it doesn't appear to be resolved. Reopening for discussion with the team. |
Thank you! I'm a bit confused as to what the future plan for python language server is. Is the goal to include linting capabilities in the language server and to enable that by default instead of using pylint? How do you go about having LS lint all files in the workspace? Is this enabled by default? |
@d3r3kk the original issue was closed so it was decided as not being required. |
@DonJayamanne I am unable to star the original issue because it is locked. Can you explain why it is deemed as not being required? The comments of #82, just seem to say that it is already implemented in language server without addressing the other linters. |
Please star this issue. |
@DonJayamanne I think there is quite a bit of interest in it. As you stated in #82, vscode even has this problem with other languages and being able to lint all files. You saw how many people commented on the original issue. Plus, with the issue being closed then I don't know how many people can find it. I also think it is an extremely useful feature that could save people time. After I finish working on a PR or some changes for a Python project, I typically want to do a full-project lint of it to see if I missed anything. This can be done from the command-line but then there are three problems:
I can understand that the feature may not be top priority for the team. However, I think this issue should still be open and it should have a tag of Note: If this issue is opened and a PR would be accepted for it, I would be interested in submitting one. I've already looked at the code and thought it over. Hoping to get more involved in the community here. What does everyone else think? |
Any comments or points about my above post? |
Unlocking to see if this gets any upvotes over the next 28 days. |
@michellequack our integrations are in no way special, so you may want to consider running your linters manually while you wait for us to a make decision about this feature request. |
One benefit to implementing this is we could execute a linter once and not per-file to save on perf overhead as in #4236. |
It's also very useful to cleanup an old project that has some history of linting errors that you'd like to cleanup. Running the command line flake8 does give me all the errors, but having it run by vscode would give me an easy "point-and-click" to jump to the relevant code to fix it. |
I would definitely love to see this implemented for all languages (well ok, for typescript at least). |
I would love to see this and I am surprised this was not here. I just assumed I did not know how to run it, I went looking for it and found this open issue. It is a bit of pain to think about opening a PR, go to problems to check whether you have missed some flake8 issue and realised you need to run it from the terminal because VSCode does not have that information :( |
@markchagers, @jaraqueffdc, @valentijnscholten |
@piotrgredowski Would this work for mypy too? |
@chrissyast it could. You can write a task to launch something like mypyd in the background and write the appropriate problem matcher to parse the output |
@chrissyast exactly like @brettcannon wrote. With correct problem matcher you can do whatever you want with output from any tool. |
@piotrgredowski Many thanks for the updated blogpost :) |
+1 for the feature |
+1 please! |
+1 as well, I added to both thumbs up and rocket-emoji in OP. In the meantime, I'll try out the task def workaround in issue #82. |
I'm now using this task for Python to run mypy on an entire project. Gets me highlights in the file explorer tree. I love it! Only downside of course is having to manually run the task.
Replace
|
+1 for this feature. |
Please leave a 👍 on the original message to upvote this idea; "+1" comments and the like are a bit noisy for the 18 folks subscribed to this issue and actually don't help with prioritization. |
This is supported for For pylint please track this issue: microsoft/vscode-pylint#79 |
What is about |
Ruff is maintained by Astral themselves, so we don't have any control of their support. |
Environment data
Feature
Add an option to run linting on entire workspace and populate problems for all files in the workspace. Currently, there is a "Run Linting option" which only works on a file-by-file basis. I propose adding a new option titled something like "Run Linting on Entire Workspace".
Note: Yes, this feature can be done by using the command line to call the script but the command-line arguments and settings in the User Settings can be tedious to copy/paste into the terminal.
The text was updated successfully, but these errors were encountered: