This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.
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.
Describe the bug When the
classdef
and its matchingend
are misaligned, attempting to suppress the resulting warning diagnostic causes the diagnostic suppression to be inserted after theend
instead of after theclassdef
.To Reproduce Steps to reproduce the behavior:
Type the following into a MATLAB file:
classdef
should have a warning diagnostic "squiggle"This result in the following:
Expected behavior The diagnostic suppression text should be added to the end of the same line the
classdef
is on.Useful Information