<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Scripting static code analysis</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e0732ce183/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e0732ce183/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/e0732ce183/</id><updated>2024-03-18T08:51:18.794000Z</updated><subtitle>Recent posts to Scripting static code analysis</subtitle><entry><title>Scripting static code analysis</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e0732ce183/?limit=25#4074" rel="alternate"/><published>2024-03-18T08:51:18.794000Z</published><updated>2024-03-18T08:51:18.794000Z</updated><author><name>k4zz</name><uri>https://forge.codesys.com/u/k4zz/</uri></author><id>https://forge.codesys.com480ae4940d51fa03a8e5d029256f0cae5db05387</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Currently, I am working on integrating static code analysis into our CI/CD pipeline. Specifically, I have successfully performed static code analysis for .project types, and it works flawlessly. However, I have encountered difficulties in executing the same for .library types. In this regard, I have tried two methods:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;system.commands["staticanalysis", "run"].execute()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;#&lt;/span&gt; get Project values
myProject = projects.primary

&lt;span class="gh"&gt;#&lt;/span&gt; Creates an active application
app = myProject.active_application

&lt;span class="gh"&gt;#&lt;/span&gt; build Application and run static code analysis 
app.generate_code()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;your help is greatly appreciated.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>