Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Feature Enhancement: M-Lint Customization
Date: Fri, 13 May 2011 22:37:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 51
Message-ID: <iqkbqe$bpj$1@newscl01ah.mathworks.com>
References: <iqjhcq$9s7$1@newscl01ah.mathworks.com> <iqjjff$gst$1@newscl01ah.mathworks.com> <iqjkcg$k2n$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1305326222 12083 172.30.248.46 (13 May 2011 22:37:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 13 May 2011 22:37:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1895050
Xref: news.mathworks.com comp.soft-sys.matlab:726729

"Andy" wrote in message <iqjkcg$k2n$1@newscl01ah.mathworks.com>...
> "Steven_Lord" <slord@mathworks.com> wrote in message <iqjjff$gst$1@newscl01ah.mathworks.com>...
> > 
> > 
> > "Andy " <myfakeemailaddress@gmail.com> wrote in message 
> > news:iqjhcq$9s7$1@newscl01ah.mathworks.com...
> > > I have submitted a feature enhancement requesting functionality that would 
> > > allow the creation (via, e.g., regular expressions) of custom M-Lint 
> > > warning/error messages.  In addition, custom and included M-Lint messages 
> > > should be editable both in the Preferences and programmatically.  I can 
> > > think of at least a few ways I would use this:, including:
> > >
> > > - %TODO messages showing up as M-Lint messages (possibly with their own 
> > > color)
> > > - Suppressing "Input argument <name> may be unused" only for eventdata 
> > > arguments in GUI m-files (i.e., for arguments which must be there, but are 
> > > unused), while still keeping this warning for other arguments.
> > > - Creating macros or shortcut buttons to toggle on and off individual 
> > > messages, or to easily switch between settings.  (I think the latter is 
> > > already possible, but not with custom messages.)
> > >
> > > So I ask the community:
> > >
> > > 1. Is part or all of this functionality currently available (and 
> > > documented), and I'm just not seeing it for some reason?
> > 
> > Not exactly as you requested it, but the %TODO messages can be flagged by 
> > the TODO/FIXME report:
> > 
> > http://www.mathworks.com/help/techdoc/matlab_env/f9-6232.html
> > 
> > and the unused input arguments can be replaced with a tilde to indicate to 
> > MATLAB that they will not be used.
> > 
> > http://www.mathworks.com/help/techdoc/rn/br5fo8o-1.html#br65zmd-1
> > 
> > -- 
> > Steve Lord
> > slord@mathworks.com
> > To contact Technical Support use the Contact Us link on 
> > http://www.mathworks.com 
> 
> I never use the TODO/FIXME report because it's in a separate file.  It's faster for me to just Ctrl+F and search for %TODO.  But it would be even better if it showed up in M-Lint.  The warnings show orange and the errors show red in the bar on the right.  If I could customize M-Lint so that %TODO shows blue, for example, then I could always see all of my TODOs at once and easily click on them to go to them.
> 
> As for the tilde, that must be a recent addition.  It does not appear to work on R2009a.

I just tried out the tilde in R2010a, and it worked.  Neat.  Also, I thought of more uses for custom M-Lint messages: 

- Weak enforcement (via warning messages) of function or variable names that don't follow the particular naming scheme that you've chosen to use for a given project.  This would especially be helpful for beginners, but in large projects even experienced users can use some inconsistent naming schemes.

- Warning when variables in the same scope have names which differ only in capitalization.