<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to exclude VARs from Static Analysis</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d107211b02/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d107211b02/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/d107211b02/</id><updated>2020-02-27T13:59:12.908000Z</updated><subtitle>Recent posts to exclude VARs from Static Analysis</subtitle><entry><title>exclude VARs from Static Analysis</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d107211b02/?limit=25#bfe9" rel="alternate"/><published>2020-02-27T13:59:12.908000Z</published><updated>2020-02-27T13:59:12.908000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com77802f72ad17e616da41cc980f37e50b76b34ef3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; KevinR&lt;/p&gt;
&lt;p&gt;Wow - Now it's working. &lt;/p&gt;
&lt;p&gt;I think this needs definitly to be added to the standard pragma attribute list, because I didn't find it there. &lt;/p&gt;
&lt;p&gt;Cheers,&lt;br/&gt;
Kevin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>exclude VARs from Static Analysis</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d107211b02/?limit=25#886f" rel="alternate"/><published>2020-02-27T13:59:12.638000Z</published><updated>2020-02-27T13:59:12.638000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comd627361dc00a3577a0e7c7c325212e8c344ffe0d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;With the installation of the Full Static Analysis functionality, you get a Add-On help topic in the online help.&lt;br/&gt;
This describes the way how to deactivate specific rules.&lt;/p&gt;
&lt;p&gt;For unused variables, which is SA0033, you can use:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; {&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'analysis'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'-33'&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt; 
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;itf_MyFB&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;itf_FBExtended&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;THIS&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; {&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'analysis'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'+33'&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This way, if i is not used, this is ignored by static analysis.&lt;br/&gt;
- is turning it off&lt;br/&gt;
+ is turning it back on&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>exclude VARs from Static Analysis</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d107211b02/?limit=25#ef76" rel="alternate"/><published>2020-02-27T13:59:12.366000Z</published><updated>2020-02-27T13:59:12.366000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com34ee423bb8dde2d18be6c0007127d746a49129ee</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; KevinR&lt;/p&gt;
&lt;p&gt;Hello Community,&lt;/p&gt;
&lt;p&gt;under projectsettings --&amp;gt; static analysis light, I enabled 'check for unused vars'. &lt;/p&gt;
&lt;p&gt;So If I declare an output var like this: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;VAR_OUTPUT&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;itf_MyFB&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;itf_FBExtended&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;THIS&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I allways get a Static analysis error: &lt;br/&gt;
SA0033: unused var .... &lt;/p&gt;
&lt;p&gt;How to avoid this message? I know, that there is an attribute to exclude warnings, but for Static Analysis I've nothing found in the online Help.&lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>