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

5 次查看(过去 30 天)
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.

回答(2 个)

Sean de Wolski
Sean de Wolski 2013-3-26
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 2013-3-27
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?

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by