<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Parsing mlint (Code Analyzer) output	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=parsing-mlint-code-analyzer-output</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 17 Aug 2023 14:49:26 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Rolf		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-522534</link>

		<dc:creator><![CDATA[Rolf]]></dc:creator>
		<pubDate>Thu, 17 Aug 2023 14:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-522534</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-187350&quot;&gt;Zipuni&lt;/a&gt;.

Disclosure: This comes from the developer/vendor of the Code Checker for MATLAB.

Have a look at the Code Checker for MATLAB by MonkeyProof Solutions which has many such (configurable) capabilities addressing best practices as well as style guide.

MonkeyProof Solutions maintains a couple of Coding Standards for MATLAB that are readily available. The Code Checker comes with (customizable) configurations for these standards.

Documentation on MATLAB Coding Standard(s):

* &lt;a href=&quot;https://doc.monkeyproofsolutions.nl/code-checker-for-matlab/monkeyproof-matlab-coding-standard/&quot; rel=&quot;nofollow&quot;&gt;MonkeyProof MATLAB Coding Standard (under industrial Change Control Board)&lt;/a&gt;

* &lt;a href=&quot;https://doc.monkeyproofsolutions.nl/code-checker-for-matlab/monkeyproof-matlab-coding-standard-plus-plus/&quot; rel=&quot;nofollow&quot;&gt;MonkeyProof MATLAB Coding Standard ++ (adds a.o. naming conventions)&lt;/a&gt;

* &lt;a href=&quot;https://doc.monkeyproofsolutions.nl/code-checker-for-matlab/monkeyproof-matlab-coder-compatibility-standard/&quot; rel=&quot;nofollow&quot;&gt;MonkeyProof MATLAB Coder Compatibility Standard&lt;/a&gt;

The &lt;a href=&quot;https://monkeyproofsolutions.nl/products/code-checker-for-matlab/&quot; rel=&quot;nofollow&quot;&gt;Code Checker for MATLAB&lt;/a&gt; comes with configurations to check your m-code against those standards but can be configured to accommodate your own (corporate) standard. Options available to integrate with CI/CD.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-187350">Zipuni</a>.</p>
<p>Disclosure: This comes from the developer/vendor of the Code Checker for MATLAB.</p>
<p>Have a look at the Code Checker for MATLAB by MonkeyProof Solutions which has many such (configurable) capabilities addressing best practices as well as style guide.</p>
<p>MonkeyProof Solutions maintains a couple of Coding Standards for MATLAB that are readily available. The Code Checker comes with (customizable) configurations for these standards.</p>
<p>Documentation on MATLAB Coding Standard(s):</p>
<p>* <a href="https://doc.monkeyproofsolutions.nl/code-checker-for-matlab/monkeyproof-matlab-coding-standard/" rel="nofollow">MonkeyProof MATLAB Coding Standard (under industrial Change Control Board)</a></p>
<p>* <a href="https://doc.monkeyproofsolutions.nl/code-checker-for-matlab/monkeyproof-matlab-coding-standard-plus-plus/" rel="nofollow">MonkeyProof MATLAB Coding Standard ++ (adds a.o. naming conventions)</a></p>
<p>* <a href="https://doc.monkeyproofsolutions.nl/code-checker-for-matlab/monkeyproof-matlab-coder-compatibility-standard/" rel="nofollow">MonkeyProof MATLAB Coder Compatibility Standard</a></p>
<p>The <a href="https://monkeyproofsolutions.nl/products/code-checker-for-matlab/" rel="nofollow">Code Checker for MATLAB</a> comes with configurations to check your m-code against those standards but can be configured to accommodate your own (corporate) standard. Options available to integrate with CI/CD.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dennis		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-487403</link>

		<dc:creator><![CDATA[Dennis]]></dc:creator>
		<pubDate>Tue, 23 Jul 2019 21:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-487403</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-357134&quot;&gt;Ed Yu&lt;/a&gt;.

Ed:
I am interested in how for you have taken the &#039;capturing the usage of “undefined” variables&#039; &#039;tool&#039; you have developed.  My current code is about 60000 lines long and guess what --- there are A LOT of undefined variables - mostly never used - that need work.  I need help.
Thx
Dennis  -- vand1  AT umbc DoT edu]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-357134">Ed Yu</a>.</p>
<p>Ed:<br />
I am interested in how for you have taken the &#8216;capturing the usage of “undefined” variables&#8217; &#8216;tool&#8217; you have developed.  My current code is about 60000 lines long and guess what &#8212; there are A LOT of undefined variables &#8211; mostly never used &#8211; that need work.  I need help.<br />
Thx<br />
Dennis  &#8212; vand1  AT umbc DoT edu</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ed Yu		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-357134</link>

		<dc:creator><![CDATA[Ed Yu]]></dc:creator>
		<pubDate>Thu, 17 Sep 2015 18:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-357134</guid>

					<description><![CDATA[Hi Yair,

Thank you for this posting... Recently I have delivered a MATLAB database product to a client and I need to check my source code to minimize errors. One of the lacking thing about MATLAB is that it is not very good at capturing the usage of &quot;undefined&quot; variables. Basically I wanted to know if I use a variable that was undefined (due to typing mistakes). I understand the interpreted nature of MATLAB and don&#039;t expect it to behave like a compiled program like Java. But still, MATLAB should provide some help in this regard. When I look into mlint it seems to be useful but when I try to turn on the preference option:

&lt;pre&gt;
Code Analyzer cannot determine whether &#060;name&#062; is a variable or a function, and assumes it is a function.
&lt;/pre&gt;

The report came back with more than the preset 500 warnings and truncated the report. This is very annoying as I work with GUIDE output and it usually contains a couple of thousand lines for a more than academic data entry screen. Also the warnings are mostly due to the internal DLL unable to recognize simple MATLAB commands such as get, set, true, false, upper, lower, figure, close, delete, strcmp, regexrep, etc.

So I ended up copying mlintrpt.m and modifying it to check the output message &#060;name&#062; and see if I can resolve it using command &#039;which&#039; and if it does, just filter out the message. This produces a pretty clean and useful mlint report because I actually found a couple of typos in variable names that would otherwise be delivered to clients until they hit that line of code and matlab produces the &quot;ding&quot; sound. I do log these error messages in a log file but the user won&#039;t necessary know the application has erred out because they have no speakers attached to their computers or turn the sound is turned off.

If anyone wants to know what I did, just contact me.]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>Thank you for this posting&#8230; Recently I have delivered a MATLAB database product to a client and I need to check my source code to minimize errors. One of the lacking thing about MATLAB is that it is not very good at capturing the usage of &#8220;undefined&#8221; variables. Basically I wanted to know if I use a variable that was undefined (due to typing mistakes). I understand the interpreted nature of MATLAB and don&#8217;t expect it to behave like a compiled program like Java. But still, MATLAB should provide some help in this regard. When I look into mlint it seems to be useful but when I try to turn on the preference option:</p>
<pre>
Code Analyzer cannot determine whether &lt;name&gt; is a variable or a function, and assumes it is a function.
</pre>
<p>The report came back with more than the preset 500 warnings and truncated the report. This is very annoying as I work with GUIDE output and it usually contains a couple of thousand lines for a more than academic data entry screen. Also the warnings are mostly due to the internal DLL unable to recognize simple MATLAB commands such as get, set, true, false, upper, lower, figure, close, delete, strcmp, regexrep, etc.</p>
<p>So I ended up copying mlintrpt.m and modifying it to check the output message &lt;name&gt; and see if I can resolve it using command &#8216;which&#8217; and if it does, just filter out the message. This produces a pretty clean and useful mlint report because I actually found a couple of typos in variable names that would otherwise be delivered to clients until they hit that line of code and matlab produces the &#8220;ding&#8221; sound. I do log these error messages in a log file but the user won&#8217;t necessary know the application has erred out because they have no speakers attached to their computers or turn the sound is turned off.</p>
<p>If anyone wants to know what I did, just contact me.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Oleg Komarov		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-305967</link>

		<dc:creator><![CDATA[Oleg Komarov]]></dc:creator>
		<pubDate>Wed, 25 Dec 2013 15:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-305967</guid>

					<description><![CDATA[The flag &lt;b&gt;-pf&lt;/b&gt; displays parfor related messages.]]></description>
			<content:encoded><![CDATA[<p>The flag <b>-pf</b> displays parfor related messages.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Function definition meta-info &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-254618</link>

		<dc:creator><![CDATA[Function definition meta-info &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Wed, 04 Sep 2013 13:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-254618</guid>

					<description><![CDATA[[...] few months ago, I wrote about mlint&#8216;s undocumented interface and ability to report much internal information about [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] few months ago, I wrote about mlint&#8216;s undocumented interface and ability to report much internal information about [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Matt B.		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-244958</link>

		<dc:creator><![CDATA[Matt B.]]></dc:creator>
		<pubDate>Fri, 23 Aug 2013 16:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-244958</guid>

					<description><![CDATA[In finding &lt;a href=&quot;http://stackoverflow.com/a/18388118/176071&quot; rel=&quot;nofollow&quot;&gt;a solution for a StackOverflow question asking &quot;Is there a way to fix all MATLAB mlint messages at once?&#8221;&lt;/a&gt;, I discovered another mlint flag by trial and error: &lt;b&gt;-fix&lt;/b&gt;.  It exposes the autofix hints and changes.  As an example:

&#062;&#062; checkcode(matlab.desktop.editor.getActiveFilename(),&#039;-fix&#039;)
L 2 (C 3): Terminate statement with semicolon to suppress output (in functions).  (CAN FIX)
&#045;&#045;&#045;&#045;FIX MESSAGE  &#060;Add a semicolon.&#062;
&#045;&#045;&#045;&#045;CHANGE MESSAGE L 2 (C 13);  L 2 (C 12):   &#060;;&#062;
L 30 (C 52-53): Input argument &#039;in&#039; might be unused. If this is OK, consider replacing it by ~.  (CAN FIX)
&#045;&#045;&#045;&#045;FIX MESSAGE  &#060;Replace name by ~.&#062;
&#045;&#045;&#045;&#045;CHANGE MESSAGE L 30 (C 52);  L 30 (C 53):   &#060;~&#062;]]></description>
			<content:encoded><![CDATA[<p>In finding <a href="http://stackoverflow.com/a/18388118/176071" rel="nofollow">a solution for a StackOverflow question asking &#8220;Is there a way to fix all MATLAB mlint messages at once?&#8221;</a>, I discovered another mlint flag by trial and error: <b>-fix</b>.  It exposes the autofix hints and changes.  As an example:</p>
<p>&gt;&gt; checkcode(matlab.desktop.editor.getActiveFilename(),&#039;-fix&#039;)<br />
L 2 (C 3): Terminate statement with semicolon to suppress output (in functions).  (CAN FIX)<br />
&#045;&#045;&#045;&#045;FIX MESSAGE  &lt;Add a semicolon.&gt;<br />
&#045;&#045;&#045;&#045;CHANGE MESSAGE L 2 (C 13);  L 2 (C 12):   &lt;;&gt;<br />
L 30 (C 52-53): Input argument &#039;in&#039; might be unused. If this is OK, consider replacing it by ~.  (CAN FIX)<br />
&#045;&#045;&#045;&#045;FIX MESSAGE  &lt;Replace name by ~.&gt;<br />
&#045;&#045;&#045;&#045;CHANGE MESSAGE L 30 (C 52);  L 30 (C 53):   &lt;~&gt;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jim Hokanson		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-203829</link>

		<dc:creator><![CDATA[Jim Hokanson]]></dc:creator>
		<pubDate>Sun, 19 May 2013 05:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-203829</guid>

					<description><![CDATA[Incredible.]]></description>
			<content:encoded><![CDATA[<p>Incredible.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-187364</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 10 Apr 2013 19:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-187364</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-187350&quot;&gt;Zipuni&lt;/a&gt;.

@Zipuni - that&#039;s a very tall order you have there. Note that [almost] everything about mlint is undocumented... In theory, you might be able to use mlint&#039;s lex and yacc outputs for this. But I must say that I believe this to be quite a challenge...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-187350">Zipuni</a>.</p>
<p>@Zipuni &#8211; that&#8217;s a very tall order you have there. Note that [almost] everything about mlint is undocumented&#8230; In theory, you might be able to use mlint&#8217;s lex and yacc outputs for this. But I must say that I believe this to be quite a challenge&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Zipuni		</title>
		<link>https://undocumentedmatlab.com/articles/parsing-mlint-code-analyzer-output#comment-187350</link>

		<dc:creator><![CDATA[Zipuni]]></dc:creator>
		<pubDate>Wed, 10 Apr 2013 18:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3713#comment-187350</guid>

					<description><![CDATA[Awesome post!  What I have been actually wondering is if one can augment the settings of Code Analyzer so that a group can enforce their own programming best practices such as camelBack notation, load() with left side assignment (no magic variables), no eval() etc.

I would basically love to go under Preferences-&#062;Code Analyzer-&#062; Default Settings and add completely new tests, not just enable/disable the existing ones ..

Of course, one can write their own parser for MATLAB but it&#039;s rather hard with all the syntactic sugar and weak types ...]]></description>
			<content:encoded><![CDATA[<p>Awesome post!  What I have been actually wondering is if one can augment the settings of Code Analyzer so that a group can enforce their own programming best practices such as camelBack notation, load() with left side assignment (no magic variables), no eval() etc.</p>
<p>I would basically love to go under Preferences-&gt;Code Analyzer-&gt; Default Settings and add completely new tests, not just enable/disable the existing ones ..</p>
<p>Of course, one can write their own parser for MATLAB but it&#8217;s rather hard with all the syntactic sugar and weak types &#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
