mathworks / mathworks/MATLAB-extension-for-vscode
Warnings shown for files not opened in editor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 435
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
When a new file is opened in the editor, MATLAB populates the "Problems" panel with its warnings and errors. For example, when a built-in function is opened in the editor (by clicking "Go To Definition" or by ctrl+clicking the function name), its code opens in the editor and we may see a couple warnings. We expect these warnings to leave the "Problems" panel once the file is closed.
However, there is a weird bug where these warnings do not go away even after closing the file. Here I have a script which contained the addpath(), genpath(), and imgaussfilt() functions. None of these files were open in the editor, yet the warnings are still shown (seen below).
The warnings appear even if I just ctrl+hover over the function names. It doesnt always happen, but in most cases it does. What more, sometimes you will see functions that were called by the built-in function. In the screenshot below, imgaussfilt.m is not there, but another file KernelDistribution.m is shown, even though it was never opened in the editor.
The appropriate behavior, in my opinion, should be to either
- Show only warnings/errors for files currently open
- Show warnings/errors for all files in the workspace, but exclude built-ins
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code using a script with addpath(), genpath(), and imgaussfilt(), then compare Problems-panel contents after ctrl-hover, Go To Definition, and closing the opened file. Trace the warning lifecycle from these editor actions and verify that warnings for closed or built-in files no longer remain, while confirming the intended workspace behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100