Skip to content
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

Problems pane ignores "Hide Excluded Files" option #103631

Closed
Sergej-Popov opened this issue Jul 30, 2020 · 12 comments · Fixed by #119040
Closed

Problems pane ignores "Hide Excluded Files" option #103631

Sergej-Popov opened this issue Jul 30, 2020 · 12 comments · Fixed by #119040
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug error-list Problems view insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@Sergej-Popov
Copy link

  • VSCode Version: 1.47.2
  • OS Version: Windows 10 (2004)

Steps to Reproduce:

  1. Create a dotnet project
  2. Add **\obj & **\bin to settings.json files.exclude
  3. Open a problems pane and check "Hide Excluded Files"
  4. Build and open problems

Expected: problems pane not to show problems in generated code in **\obj folder.
Actual: all problems are still visible under problems pane but as expected not visible in the explorer.

image

Does this issue occur when all extensions are disabled?: No, the "problems" are generated by an extension. So cannot reproduce this way.

Related issue: #22289

@gjsjohnmurray
Copy link
Contributor

AFAIK the feature in Problems to exclude items uses its own filter, which you must enter in the field to the left of the filter button. I don't think it pays any attention to files.exclude

@Sergej-Popov
Copy link
Author

Sergej-Popov commented Jul 30, 2020

This comment suggests that files.exclude suppose to work: #22289 (comment)

While I can use the Filter on the left, it is separate from "Hide Excluded Files" option. They don't interact.

@gjsjohnmurray
Copy link
Contributor

Deferring to @sandy081

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug error-list Problems view labels Aug 4, 2020
@sandy081 sandy081 added this to the August 2020 milestone Aug 4, 2020
@Sergej-Popov
Copy link
Author

Clarification with regards to

/**
* Respectes files.exclude setting in filtering out content from the explorer.
* Makes sure that visible editors are always shown in the explorer even if they are filtered out by settings.
*/
export class FilesFilter implements ITreeFilter<ExplorerItem, FuzzyScore> {

Problems are always visible not only when the file is open in the editor. I opened one in the screenshot just to show the error, but others that aren't open in the editor are still visible in the Problems pane too.

@ghost
Copy link

ghost commented Aug 7, 2020

Oh alright, I realized I misunderstood so that is why I deleted my comment. I apologize for any confusion. Lemme see if I can figure something out today

@ghost
Copy link

ghost commented Aug 7, 2020

Hi upon further investigation it appears that this feature uses a different list. I believe that it goes off of this list found in settings. But I do also acknowledge #22289. @sandy081 could you maybe give me some input here? Maybe it can use both the global setting and the setting.json option together?
Screen Shot 2020-08-07 at 10 13 42 AM

@sandy081 sandy081 modified the milestones: August 2020, September 2020 Sep 2, 2020
@LC43
Copy link

LC43 commented Sep 24, 2020

this also happens with php language server.
is there a

"php.problems.exclude" : {
        "node_modules/**" : true,
    },

of some sort, like devsense extension has?

I have to disable "php.validate.executablePath": "/aaaa", altogether because "php.validate.enable": false, doesn't stop vscode to fill Problems pane.

@gjsjohnmurray
Copy link
Contributor

@Sergej-Popov I wasn't able to reproduce this issue when I tested just now on 1.52.1. Problems reported on a file whose name matched a glob in files.exclude disappeared from the panel when I selected the "Hide Excluded Files" filter. They reappeared when I deselected that filter option, or when I removed or disabled the files.exclude entry.

If the problem still exists for you please provide simple repro steps.

@sandy081 sandy081 added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Jan 29, 2021
@sandy081
Copy link
Member

@gjsjohnmurray Very much appreciated for validating the issue again.

@Sergej-Popov Please provide exact steps to repro.

@Sergej-Popov
Copy link
Author

Sergej-Popov commented Jan 30, 2021

Hey @sandy081 @gjsjohnmurray I did a repro on a clean machine and I know exactly what the issue is now.

It has to do with how glob pattern is applied in the problems pane.
If you apply it on folder like this - it does not work for problems pane, but works in explorer view.

{
    "files.exclude": {
        "**/test": true
    }
}

If you apply it on all files inside the folder - it works for problems pane and explorer view.

{
    "files.exclude": {
        "**/test/**": true
    }
}

I was able to reproduce this behaviour in typescript solution too, so dotnet was a red herring.

vscode-103631-repro

@sandy081
Copy link
Member

sandy081 commented Feb 2, 2021

Thanks for the repro. Will investigate in February.

@sandy081 sandy081 modified the milestones: Backlog, February 2021 Feb 2, 2021
@sandy081 sandy081 removed the info-needed Issue requires more information from poster label Feb 2, 2021
@sandy081 sandy081 modified the milestones: February 2021, March 2021 Feb 24, 2021
jeanp413 added a commit to jeanp413/vscode that referenced this issue Mar 16, 2021
jeanp413 added a commit to jeanp413/vscode that referenced this issue Mar 16, 2021
@jeanp413
Copy link
Contributor

Pushed a PR #119040 with a possible fix

@sandy081 sandy081 modified the milestones: March 2021, April 2021 Mar 24, 2021
@sandy081 sandy081 added the bug Issue identified by VS Code Team member as probable bug label Apr 23, 2021
@alexr00 alexr00 added the verified Verification succeeded label Apr 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug error-list Problems view insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@LC43 @Sergej-Popov @gjsjohnmurray @sandy081 @jeanp413 @alexr00 and others