mathworks / mathworks/MATLAB-extension-for-vscode

Linter Issues for Renamed Class Definitions

Open
#119 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
435
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
User-defined classes aren't properly linted, causing confusion at best and errors at worst.

To Reproduce

  1. Make a new file testClass.m.
  2. use the classdef snippet, make a new class testClass.
  3. Rename the file to TestClass.m -- the linter doesn't recognize any issues.
  4. Rename the classdef and constructor function to TestClass -- though this is correct and runs as expected, the linter gets angry.

Expected behavior
At step 3, the linter should get angry.
At step 4, the linter should calm down.

Screenshots
The Linter needs to get angry here
image

and calm here
image

Useful Information

  • OS Version: Windows 11
  • VS Code Version: 1.87.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in VS Code using the testClass.m and TestClass.m classdef examples from the issue, then trace the MATLAB extension's linter handling of class and file names. Done means the linter reports the mismatched renamed file and class, while accepting the correctly renamed classdef and constructor.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.