Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode Filter Problems tab for currently opened file only

I'm looking for a linter feature like-atom that shows the problems by either line, file or project.

Is it possible to filter the Problems tab to only show the errors and warnings in the file being visualized or in the files opened in different tabs instead of from the entire project?

like image 277
user3677933 Avatar asked Mar 09 '17 16:03

user3677933


2 Answers

VSCode v.1.23 added the ability to filter the Problems panel by files, see problems view filtering in the release notes.

So you can include (or exclude via the usual glob negation !) only a certain file by entering its name (you may need only a part of it). The filtering is done only within opened tabs however. So you cannot get the entire workspace's problems listed when only some of its files are opened.


The ability to filter the problems panel by the current file has been added to the Insider's Build just recently (@mid-November 2019) so should be in the November 2019 update.. See https://github.com/microsoft/vscode/issues/30038 and https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_41.md#problems-panel

More predefined filters are added to the Problems panel. You can now filter problems by type and also see problems scoped to the current active file.


demo of filter problems by current file.

like image 101
Mark Avatar answered Oct 28 '22 20:10

Mark


The feature you describe is not currently in VSCode, (I miss it too having got used to it in Eclipse)

There is an open issue with VSCode for this:

Show problems only for currently active file / active line #30038

like image 22
Spangen Avatar answered Oct 28 '22 19:10

Spangen