MATLAB-extension-for-vscode
MATLAB-extension-for-vscode copied to clipboard
Diagnostic suppression for misaligned `classdef...end` places suppression in wrong location
Describe the bug
When the classdef
and its matching end
are misaligned, attempting to suppress the resulting warning diagnostic causes the diagnostic suppression to be inserted after the end
instead of after the classdef
.
To Reproduce Steps to reproduce the behavior:
- Type the following into a MATLAB file:
classdef Foo
end
- The
classdef
should have a warning diagnostic "squiggle" - Hover on the diagnostic, click "Quick Fix...", and select "Suppress message ALIGN on this line"
- This result in the following:
classdef Foo
end %#ok<ALIGN>
Expected behavior
The diagnostic suppression text should be added to the end of the same line the classdef
is on.
Useful Information
- OS Version: Windows 11
- VS Code Version: 1.83.1
- MATLAB extension version: 1.1.3