-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Feature Request: Show all errors and warnings in project for all JavaScript and TypeScript files, not just opened ones #13953
Comments
@waderyan this is a feature request for the builder work we discussed with the TS team. |
For reference here is a link to the issue - microsoft/TypeScript#11229 |
Well, I just use a watching build task with |
any ETA on this ? There's a lot of issues opened for that feature and not sure if I missed anything or not 😄 |
@maxime1992 thanks for the follow up. This is on our radar. No firm timeline yet. |
Something I didn't realize was that it's possible to do this with the Tasks infrastructure that VSCode has. All you have to do is put this into your tasks.json:
Then just run it and you'll get all of the errors across your entire project in the problems view. I'm a bit perplexed why this isn't displayed more prominently. It's super useful and cool. |
@johnfn Great solution, thanks a lot. I would even add the "--noEmit" argument if the sole purpose of the task is to show the errors {
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-w", "-p", ".", "--noEmit"],
"showOutput": "silent",
"isBackground": true,
"problemMatcher": "$tsc-watch"
} |
@kevinjreece You can use the Semantic History feature of iTerm (https://www.iterm2.com/documentation-one-page.html) to prevent the "fun dance between my terminal and VS Code". When cmd clicking on the filename + line number it automatically opens the corresponding line in vscode! |
Anyone know if it's possible to open files with errors/in the Problems panel with a keyboard shortcut? Real pain to keep switching between mouse and keyboard, even after running the task. |
You can open the Problems panel with |
No, I'd like a shortcut to go to the next file that has an error, whether or not it's open. I was looking into making an extension to do it, but the API is locked down tight, commands don't have access to the MarkerService (tracks problems) in any way that I can see. |
Oh I see. That could be quite useful. Sounds like the |
anyone experiencing this issue #34412? |
The trick with But you can find a way to have all errors by watching and compiling your project into a VS Code terminal. For example, I did this npm script: And I launch it via "npm run live-check" into a VS terminal and I have all errors in real time. |
even with the solution from @johnfn , I can only see errors from open files :(. tasks.json:
tsconfig.json
Why can't I see errors from closed files (I am sure that there are errors) ? |
👍 |
Just use WebStorm |
I would, really, if it stopped breaking everything else in my setup. |
Adding this to
|
This works, but it just shows errors for everything under My tsconfig has: "include": ["src"],
"exclude": ["node_modules"] Which I would have assumed means it would exclude node_modules...? Even if filtering via |
For anybody still looking here, I can confirm this solution works like a harm. It's also mentioned here: https://stackoverflow.com/questions/55201424/how-to-get-vscode-to-show-typescript-errors-for-files-not-open-in-the-editor#60116499 |
One problem with the To fix that issue I always have to turn off the setting and turn it back on (change it from |
If anybody finds it useful, I created a VSCode extension "Bulk Problem Diagnostics" It allows to open all files in a folder and all subfolders in order to review problems. Splits large number of files in batches to prevent unloading. It has a wide range of settings controlling how many files to open, what file types, what to exclude, how long to wait before opening files. |
tsconfig.json
to disable errors/problems within node_modules |
Whenever I rebuild solution, VS shows me all Errors and Warnings, but I understand that this is probably impractical for very large projects. I'm also a beginner so, sorry if what I said is not the proper way to do things. |
Anyone have advice for getting
|
You will always need to open one file to boot up the language service. From my experience, that setting will show you all errors for the ts projects which currently have open files, not all ts projects in the workspace. |
@marinaglancy thank you! You're an angel! I like how it opens in a hidden way. I was afraid it's going to open and close a bunch of tabs quickly (visually on my screen), but it just opens the files internally and checks them, then only opens a tab for them if a problem was found. Awesome! Now, is there a way to automate it, so that it runs either periodically or runs when saving? But maybe that's not a good idea because it takes a while to check all files. My small project itself has 125 files already, imagine one with 3000 files. If only there was a way to go by references. |
Because it's not about fixing the existing issue of this experimental feature for TS or JS, it is about implementing a proper solution in the language server API for any language. Note: Thank you for the constructive answer. Many people are subscribed to this issue. |
It would be a huge performance hit if all enabled extensions constantly analyse ALL files in the workspace for problems. Currently they usually only do it only when a file is open by listening to the "file open" and also "file edited" events Maybe VSCode could introduce a new event "file waiting to be analysed" and advise all extensions to listen to it (and trigger it as configured)? But it would require changes to absolutely all extensions in the marketplace that report diagnostics. @ADTC your question is specific to the "Bulk problem diagnostics" extension. Let's not pollute the discussion here, I created an issue in my own repo where we can discuss it |
I found a temporary fix. Enable |
|
I still don't have it. Also, my friend did the same thing I did, and it's working fine for him. |
Anyone know a solution for this? |
I have the opposite issue with Files are incorrectly detected to have errors pertaining to an unresolved module, which is actually in the paths option of my The errors only go away while the file with the error is currently active in the editor, not just opened. There are 187 of these files and over 600 problems, so I'd like to keep them closed :) |
seconding this issue, anybody stumbled upon a solution? |
This comment has been minimized.
This comment has been minimized.
Also seeing this. Took me a while but I've finally determined the issue is related to It's possible this is happening because
More info here: https://www.typescriptlang.org/docs/handbook/configuring-watch.html |
I am using VS Code on a project at work that has hundreds of files and many layers of nested sub-directories. I frequently make changes that break many files, such as changing the call signature of a commonly used method. Since the project is entirely typescript, it is useful to be able to open the "Problems" view and see the errors and warnings my change caused in the files I have open. However, because of the size of the project, I still need to go to my terminal and run our own make commands to see the list of problems. I then need to perform the fun dance between my terminal and VS Code, searching for the right line in the right file before I can fix the problem.
What I need is a way to tell the "Problems" view to show me all errors and warnings across all open and closed files in my project. This would allow me to see all problems in a single list and quickly click through and fix them.
The text was updated successfully, but these errors were encountered: