Reputation: 519
I'm using VS Code 1.41.0 on Windows 10 x64.
In my code (which is in a research language you've likely never heard of), there is a certain class of warning message I get a lot of in the Problems panel, and I want to ignore those messages. The text of the message varies a bit across instances, but it always contains the word "duplicate". How can I filter out problems containing "duplicate"? The text filter that already exists keeps problems containing the specified text, and I want the opposite.
I tried !duplicate
but it didn't seem to do anything.
Upvotes: 5
Views: 5197
Reputation: 52166
Versions of VS Code prior to the March 2021 release were not able to do negative text content filters using the !
prefix- only negative glob (file path) filters. This was tracked in Support negative filters on text
#62531, which was implemented for said release in fix #62531 add negative text filtering to Problems #115351.
From my quick test on version 1.82.1, some syntax which is typically used in file globs such as {foo,bar}
does not work for negative text content filtering. If you want such a feature, you can raise an issue ticket asking for it.
Upvotes: 1
Reputation: 2148
Not the answer you are looking for, but negative filters currently only work with glob patterns, not with text. This is a known issue with the filter feature of the problem panel in vscode. You can check the progress here: https://github.com/microsoft/vscode/issues/62531
Upvotes: 5