Installation guide
M-Lint Code Analyzer
There are a few different ways to suppress the M-Lint indicators and
messages:
• “Ignore Only a Specific Instance” on page 6-99
• “Disable All Instances in All Files” on page 6-101
• “D is able Specified M essage s or in Selected Files as Needed” on page 6-101
Note that you cannot suppress M-Lint e rror messages such as syntax errors,
and therefore, the following opt ions do not apply.
Ignore Only a Specific Instance
Right-click at the M-Lint underline (for a single-button mouse, use
Ctrl+click). From the context menu, select
Ignore this "Terminate
statement with semicolon..."
. M-Lint adds a %#ok<NOPRT> to the end of
the line, which i nstructs MATLAB not to check for a terminating semicolon at
that line. M-Lint removes the underline and mark in the M-Lint indicator
bar for that message.
If there are two messages on a line that you do not want M-Lint to display,
right-click separately at each underline and select the appropriate entry from
the context menu. M-Lint expands the
%#ok syntax. For the e xam p le, ignoring
both messages for line 49 would add
%#ok<NBRAK,NOPRT>.
For more information about
%#ok,seethemlint function reference page.
This method of suppressing the messages changes the M-file. If M-Lint
preferences are to set to enable this message, the specific in stan ce of the
message suppressed in this way will not appear because the
%#ok takes
precedence over the preference setting. If you later decide you want M-Lint
to check for a terminating semicolon at that line, delete the
%#ok<NOPRT>
from the line.
6-99