How to fix all instances of one particular mlint (code analyzer) warning?

5 views (last 30 days)
I have a very large m-file with a lot of unused function arguments (typically the "h_obj" and "eventdata" arguments automatically generated by Guide). Mlint suggests I replace them with a ~, which I am happy to do. Problem is that there are hundreds of these. How can I fix them all at once? I'm not talking about suppressing the warning--I know how to do that. I want to fix them all without having to click on "fix" for each one.

Answers (2)

Sean de Wolski
Sean de Wolski on 26 Mar 2013
Please contact support and submit an enhancement request for this!
As for a workaround:
[inform,filepaths]=checkcode('filename')
You might be able to loop over this and use either fprintf or the Editor API to overwrite what's there (it gives you line and column info). It'll be hideous and kldugy though...

Scott
Scott on 27 Mar 2013
On second thought, maybe this feature would be useless to me.
The Matlab editor is so slow and laggy that I have to turn off m-lint reporting and cell mode just to help edits keep up with my typing.
Is there a third party editor that plays nicely with Matlab and interfaces with the live error checking?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!