I search for an automatic way to find out if a file has a syntax error. That is, to find the same piece of information that the Code Analyzer indicates with red in the "Message indicator box" of the editor.
I took for granted that checkcode provides the information corresponding to the colors of the "Message indicator box".
Doc (R2012a) says:
Code Analyzer messages, [...
thus, I tried
info = checkcode( filespec );
info = checkcode( filespec, '-id' );
However, I cannot find the piece of information I need. isempty(info) equal to true indicates green, but, I cannot figure out how to find an indicator for red. (Not empty indicates red or orange.)
One way would be to have a list of the ID, which stands for errors.