필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
Scott
Scott 2013년 3월 26일
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