Skip to content

Add a setting to enable retaining listed problems in the Problems tab when files are closed #155172

Closed
@Mike-Logit

Description

@Mike-Logit

Usually, I have to open individual files for the errors and warnings (a.k.a. problems) to show in the Problems tab of vscode. The Problems tab retains all the listed problems for all opened files until I begin to close files and the problems start to disappear.

In my React-based project, I run ESLint . to report all problems for the entire project without the need to manually open each file which works fine. These problems remain in the Problems tab even if the associated files are not open in vscode.

The problem is that when I click on a problem or open up the associated file that contains the mentioned problem and then I close the file the problem disappears in the Problems tab.

The feature I would like is to be able to have a setting that is configurable in settings.json to retain these problems so they do not disappear when closing files.

I have configured ESLint as an automated task that runs when vscode is launched so that my development team can keep an eye out for any problems reported.

Running ESLint . manually in a vscode terminal also reports the same results listed in the Problems tab which are also removed when I open and then close the associated files so I don't think the issue is the tasks.json file, but I'll add the tasks.json below just in case you want to see it (I use type shell instead of eslint due to another off-topic bug where the task fails to run due to a "task detection didn't contribute a task" error message, but the shell task does work).

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "lint",
      "type": "shell",
      "command": "node_modules\\.bin\\eslint.cmd . ",
      "problemMatcher": ["$eslint-stylish"],
      "runOptions": { "runOn": "folderOpen" }
    }
  ]
}

It can be very inconvenient at times to have to re-run ESLint to regenerate these problems when I lose them by accident. I think if this was changed to retain the listed problems then it would help the whole dev team.

GIF to illustrate the problem:
problems-disappearing

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions