microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.05k stars 29.22k forks source link

Support strict matching in Problems filtering #198683

Open schaurichr opened 11 months ago

schaurichr commented 11 months ago

Type: Bug

This bug report describes a problem regarding the PROBLEMS view (workbench.actions.view.problems)

Prerequisites:

  1. clangd is installed and active
  2. open a C++ file which causes 'clangd' and 'clang-tidy' warnings
  3. write 'clangd' into the problems filter line edit Result:
  4. clangd and clang-tidy warnings are displayed
  5. the following characters are highlighted clangd: whole word clang-tidy: 'clang' and the 'd' in 'tidy'

If you set the filter to 'clang-tidy', the view only shows clang-tidy warnings.

The overall behavior of the filtering is quite strange and it should be explained to users how the matching works.

VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:50:47.800Z) OS version: Linux x64 5.14.21-150500.55.36-default Modes:

Extensions (15) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.4.2 githistory|don|0.6.20 gitlens|eam|14.5.0 font-switcher|eva|4.1.0 simple-new-file|fay|1.1.2 output-colorizer|IBM|0.1.2 vscode-clangd|llv|0.1.24 git-graph|mhu|1.30.0 autopep8|ms-|2023.8.0 pylint|ms-|2023.10.1 python|ms-|2023.20.0 vscode-pylance|ms-|2023.11.10 cpptools|ms-|1.18.5 vscode-yaml|red|1.14.0 sort-lines|Tyr|1.11.0 (1 theme extensions excluded)
sandy081 commented 11 months ago

/gifPlease

vscodenpa commented 11 months ago

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

schaurichr commented 11 months ago

Let me provide a less compilcated example. Let's assume I want to see only the problems containing the word 'do'. image Then I'll get a bunch of results. Some make sense, as image but some don't image The filter matcher seems to not match whole words or a continuuous string of letters. It matches the given letters in the order they are provided in the filter line edit. That makes it not very useful. In my previous, more practical example I mentinoned clang-tidy and clangd. You cannot match 'clangd' without matching 'clang-tidy'. This is pretty painful, as I usually have to work on legacy code which contains hundreds of warnings, generated by clangd, clang-tidy or gcc. When I try to filter for 'gcc' I get results for filenames as 'image.cc' too.

vscodenpa commented 8 months ago

Hey @sandy081, this issue might need further attention.

@schaurichr, you can help us out by closing this issue if the problem no longer exists, or adding more information.