-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Ignore folders/files in Problems view #22289
Comments
@bravecobra what is the source of the problem. Usually you can configure this with the tool that generates these problems. Is it ESLint, JS, ... |
I think that's the problem. I have no idea which tool is generating the errors or where to configure them. My workspace is filled with projects in JavaScript, TypeScript, C#, SCSS, HTML, etc.. One of my sub-folders contains an angular 2 project, another one contains an ASP.NET website, some of them are javascript or plain html5/CSS. All of them using 3rd party dependecies through nuget, npm, bower,etc
In other words, currently, the Problems view is no real added value to me as its behaviour "appears" random to me (I'm sure it is not). Without any indication of which tool/plugin/setting is generating the problem and where/how it can be configured, there is no way of ignoring/fixing 3rd party code. I'd be happy to configure each individual tool to ignore folders or files (if the tool provides that), but first I'd need to know which tool it is. Secondly, what if the tool itself doesn't provide such a feature and I choose to ignore the problem/warning (it might not be my own code), how would I make it disappear from the problems view? So the original question boils down to :
|
Echo problem should start with a [*] indication pointing to a tool that generated the problem. So [ts] means TypeScript, [js] means JavaScript, [eslint] means ESLint, .... Does that help identifying the tool generating your problems. |
That would identify them (maybe), but still that would not allow for uncluttering the view. For instance, the build-in validation (https://code.visualstudio.com/docs/languages/css) does not allow me to specify folders to ignore (the vendor folders like node_modules) on a project basis. Just an [*] indication would indeed point you to a tool, which "might" enable you to un-clutter, so that still doesn't solve my second remark at the end of my previous reply. Adding a "problem view filter" setting in the .vscode folder on a project basis would do that. Indicating that x number of problems were hidden due to this setting, might even help to find incorrect items added to the setting. Basically, I want to right-click in the problems view on "ignore this problem"or "ignore problems in this folder" or something alike. The indicator would indeed allow you to configure the tool correctly so it doesn't spit out these problems, but as I said, the tool might not be able to do so. |
Any solution for this? I am having a similar issue where I got problems reported from stuff in my node_modules folder. My TSCONFIG
Not sure how to tell VS CODe to ignore these problems. Lot's of them are about README.md lines in node_modules |
Hello! |
I'm having same issue. I can't find how to configure in-built validators (css, html) to ignore folders like |
I have related problem with html linting problems in |
for me, it shows "problems" from .history folder which contains temporary versions of files (so it really is not a problem for my code). But on first places in Problems tab I still see that some old version of app.component.ts - app.component_20170515154207.ts was for few seconds saved in incorrect state. Problem text (I assumed it comes from tslint, but this directory is ignored in settings): My settings already contains also this parts: User settings
Workspace settings
I do not know what else I could do anymore. |
This has recently become a problem for me as well, now that vscode-go allows for building the entire workspace. This feature also builds all the vendor folders and reports problems on them, which I cannot easily fix from the go build tools. We need a top level filter pattern which allows us to ignore file patterns or even basic string matches of errors we'd like to ignore from a users perspective. There are no so many plugins which can generate problems that attempting to solve this at it's source puts an undue onus on the user to go track down settings when it could be a simple UX of right-click->ignore this file or right click->ignore pattern. |
if a problem indicates [css], it doesn't tell us which extension is generating the problem. It would be helpful to identify the source to be able to configure it. I'm presuming that if I can identify the source then I can configure the source to ignore areas I'm not concerned with. An ignore pattern option would be nice.....akin to throwing a sheet over the problems...out of sight, out of mind. |
I'm seeing this problem too. In my case, like #22289 (comment), it's the .history folder reporting [ts] errors in the Problems view. I have already excluded .history from both |
Any chance that VSCode could be made to ignore everything in .gitignore (and similar files for version control systems) this is a great indicator of what code I am interested in. |
I'm also seeing problems reported from files in node_modules. The worst part is I don't know what added the problem... If I don't know how it was reported, where do I start looking to fix it. Which addin etc.... |
I also have problems with node_modules as others state. It irks some files from that folder to have problems. How to ignore folders from scanning, like node_modules? |
I've experienced the same issue. In my case, the Problems View is cluttered with warnings reported by Markdown on files in node_modules.
|
same problem, for me it is a folder with temporary created php files. |
Same thing here. The |
Anyone made headway on this? I also disabled my html-css-class-completion and this got rid of 96+ "problems" this is obviously? an issue with that plugin? should we open an issue there. Just thinking outloud here. |
I have the same issue with node_modules using VSCode 1.16.0 on Windows 10 version 1607. I resolved the issue by adding the following to my
After closing all instances of VS Code and reopening it, node_modules was no longer visible in the list of files and folders. Also, I no longer experienced warnings or errors from node_modules. It's not enough to reload the window. You MUST close all instances of VS Code. If you don't, the node_modules folder will no longer be visible, but the errors and warnings will still be present. |
@robv8r Your solution works but this is not the good solution. Now, if I want check content of libs to understand them or search more informations, I can't do this |
This solved it for me Go to File -> Preferences -> Settings (or on Mac Code -> Preferences -> Settings) Add this code to the settings.json file displayed on the right side: // Place your settings in this file to overwrite default and user settings. {
} |
Such would NOT solve it for me. I still want to be able to access
node_modules folder from the explore tab, I just don't want it to appear in
the problems tab, as that is code I cannot correct.
|
You can now exclude folders/files in problems view using following filters
This will be available from tomorrow's insiders |
Awesome! But the count badge shows the full count, which seems odd to me. But thanks! |
Count badge shows total number of problems. Filtered count is shown in the badge in filter input box. |
@awarecan Is that in the file explorer? |
Yes, in the explorer. I am using version 1.23.0 |
Filters in Problems view are view only filters. It will only exclude in Problems view. |
How do we get the problems tab to ignore node_modules? Thanks |
Using the exclude glob pattern: |
That does work, but the file is still highlighted in tree. |
Highlighted in tree? Can you please paste the screenshot? |
I think @lukepighetti is talking the same issue with mine. Screenshot is here: #22289 (comment) |
That is correct! |
As a side note – ideally it would just ignore everything in .gitignore |
I like to have a Likes other comment in this issue, |
If no diagnostics/problems have to be generated for specific files, the corresponding extension should provide that feature. |
I am using ionic and since last version of visual studio code (1.23.1) I am also receiving problems from platforms\android... java files which I need to ignore because they are not relevant. |
@awarecan I agree, this is the best way to proceed.
|
I think the right and efficient approach is to extensions provide options to exclude. @awarecan Can you please check with the extension to provide the exclude option. |
Since this issue is resolved, I am locking it. Please open new issues for new requirements/bugs. |
The Problems View now lists all problems, even in 3rd party code like in node_modules, which is cluttering the actual problems of the opened project. You should be able to ignore certain folders/files while diagnosing/listing problems. This should be possible on a project basis, not as a VSCode setting. (thus in the .vscode/settings.json)
The text was updated successfully, but these errors were encountered: