MATLAB Community

MATLAB, community & more

Finding the right M-Lint message

I promise that this’ll be my last post on the new M-Lint features (for awhile anyway). In last week’s post on the new M-Lint preferences, I glossed over the new search bar, so this week we’ll dive into its features.

Every release since M-Lint was first integrated into the editor has had more and more messages, making it difficult to find a particular message to turn off. For R2009a, we took Ken’s search and filter box and added it to the M-Lint preferences panel.

Let’s say you found the “Input argument … might be unused” message annoying and wanted to turn it off, but could not remember the exact text of the message. Searching for “be unused” shows us all the messages that contain the words “be” and “unused”.

searching for the text 'be unused'

The search mechanism searches all the messages’ text, message identifier, category, and extended help, but only the message text and extended help is highlighted with the results. For instance, if we wanted to search for messages pertaining to MExceptions, we see that there are no messages that contain the term “MException”, but there are four messages that discuss MExceptions in their extended help.

searching for the text 'MException'

In addition to filtering based upon the text of messages, the filter’s dropdown menu contains options for filtering messages based on if they are enabled/disabled, if the setting has been modified from the factory defaults, by category, and a few others.

the filter's dropdown menu'

The one thing that the new UI doesn’t make easy is finding out what the (%#ok) tag is for a particular message. This would be handy for typing in the ok’s for a particular file by hand. Since we weren’t sure how many people would use it or come to this panel to find out those tags it did not seem worth it to complicate the UI just to show them. We might revisit that again in the future if it becomes compelling.

  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.