Code covered by the BSD License  

Highlights from
find lines of code which are not suppressed (no semicolon at end)

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 1.71 KB File ID: #23665

find lines of code which are not suppressed (no semicolon at end)

by Ueli Rutishauser

 

13 Apr 2009

Finds code that generates output in the command window due to a missing semicolon (non-suppressed)

| Watch this File

File Information
Description

Ever had the annoying problem that a large program consisting of many files generated unwanted text output in the command window due to non-suppressed output ?

This function finds, based on profile data, lines of code which produce non-suppressed output (not terminated by semicolon). Only functions which are actually called are considered.

 to use:
 profile on;
YourFunct(a,b,c);
profile off;
 p=profile('info');
 findNonSuppressedOutput( p, '/code/projectA/' )

this will run mlint on all called functions in path code/projectA/ (and subdirs) and report lines that contain the requested mlint IDs (here: non-terminated lines, IDs NOPRT and NOPTS) functions called that reside outside the provided path are ignored. Note that only lines which mlint correctly identifies are found.

Acknowledgements
This submission has inspired the following:
Manchester
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mlint Ueli Rutishauser 14 Apr 2009 10:15:08
profile Ueli Rutishauser 14 Apr 2009 10:15:09
output window Ueli Rutishauser 14 Apr 2009 10:15:09
suppressed output Ueli Rutishauser 14 Apr 2009 10:15:09
silent Gautam Vallabha 17 Apr 2009 13:21:37
output Gautam Vallabha 17 Apr 2009 13:21:37
profiler Gautam Vallabha 17 Apr 2009 13:21:37
utility Gautam Vallabha 17 Apr 2009 13:21:49

Contact us at files@mathworks.com