Topic
• 2 replies
• Latest Post - ‏2009-03-26T19:49:24Z by ScottN
22 Posts

Pinned topic Ant task for static analysis

‏2008-11-01T22:06:31Z |
Hi there,

after reading the product documentation I haven't found any information regarding the integration of Rational Software Analyzer with external static analysis systems using ant.

In this page (http://www.ibm.com/developerworks/rational/library/08/0429_gutz1/index.html) it is said that the product is available in ANT task format to support integration into existing build systems. Unfortunately I couldn't find any example so, please, could you give me some examples of using tha ANT task?.

Updated on 2009-03-26T19:49:24Z at 2009-03-26T19:49:24Z by ScottN
22 Posts

Re: Ant task for static analysis

‏2009-03-03T10:15:33Z
this excerpt from the product help illustrates how to launch the analysis from a command line. invoking from Ant is an exercise left to the reader.

Developing > Using the analysis command line

Examples for running software analyses from a command line

You can use these command-line examples for the Windows® and Linux® operating systems to help you write your own software analysis commands.

Windows example
This example runs an analysis on source files in an Eclipse workspace on a Windows host.
The example command references the fully qualified path to the Eclipse executable file (C:\Program Files\IBM\Software Analyzer EE\eclipse.exe). You enter the fully qualified path to the Eclipse executable file or change your current working directory to the Eclipse installation directory.

For each parameter value, you provide the fully qualified path information or define the path information in environment variables and reference the environment variables in the command.

In this example, the command output is redirected to the helloworld.log file. The output lists the URL report link and lists the analysis rule results.

C:\Program Files\IBM\Software Analyzer EE\eclipse.exe -nosplash -data C:\Program Files\workspace\HelloWorld -application com.ibm.rsaz.analysis.commandline.AnalyzeApplication -rulefile C:\RSAR\rules\helloworld.dat -exportDirectory C:\exports\helloworld -reportDirectory C:\Program Files\IBM\Software Analyzer EE\tomcat\webapps\ROOT\rsar\reports -directory C:\RSAR\workspaces\HelloWorld\HelloWorld\src > helloworld.log
Linux example
This example runs an analysis on source files in an Eclipse workspace on a Linux host.
The example command references the fully qualified path to the Eclipse executable file (/opt/IBM/SoftwareAnalyzerEE/eclipse). You enter the fully qualified path to the Eclipse executable file or change your current working directory to the Eclipse installation directory.

For each parameter value, you provide the fully-qualified path information or define the path information in environment variables and reference the environment variables in the command.

In this example, the command output is redirected to the output.log file. The output lists the URL report link and lists the analysis rule results.

/opt/IBM/SoftwareAnalyzerEE/eclipse -nosplash -data /home/builder/workspace.rsaree -application com.ibm.rsaz.analysis.commandline.AnalyzeApplication -rulefile /home/builder/rules/rules.dat -exportDirectory /home/builder/exports -reportDirectory /opt/IBM/SoftwareAnalyzerEE/tomcat/webapps/ROOT/rsar/reports -directory /home/builder/workspace/projectname/src -verbose > output.log
• ScottN
20 Posts

Re: Ant task for static analysis

‏2009-03-26T19:49:24Z
this excerpt from the product help illustrates how to launch the analysis from a command line. invoking from Ant is an exercise left to the reader.

Developing > Using the analysis command line

Examples for running software analyses from a command line

You can use these command-line examples for the Windows® and Linux® operating systems to help you write your own software analysis commands.

Windows example
This example runs an analysis on source files in an Eclipse workspace on a Windows host.
The example command references the fully qualified path to the Eclipse executable file (C:\Program Files\IBM\Software Analyzer EE\eclipse.exe). You enter the fully qualified path to the Eclipse executable file or change your current working directory to the Eclipse installation directory.

For each parameter value, you provide the fully qualified path information or define the path information in environment variables and reference the environment variables in the command.

In this example, the command output is redirected to the helloworld.log file. The output lists the URL report link and lists the analysis rule results.

C:\Program Files\IBM\Software Analyzer EE\eclipse.exe -nosplash -data C:\Program Files\workspace\HelloWorld -application com.ibm.rsaz.analysis.commandline.AnalyzeApplication -rulefile C:\RSAR\rules\helloworld.dat -exportDirectory C:\exports\helloworld -reportDirectory C:\Program Files\IBM\Software Analyzer EE\tomcat\webapps\ROOT\rsar\reports -directory C:\RSAR\workspaces\HelloWorld\HelloWorld\src > helloworld.log
Linux example
This example runs an analysis on source files in an Eclipse workspace on a Linux host.
The example command references the fully qualified path to the Eclipse executable file (/opt/IBM/SoftwareAnalyzerEE/eclipse). You enter the fully qualified path to the Eclipse executable file or change your current working directory to the Eclipse installation directory.

For each parameter value, you provide the fully-qualified path information or define the path information in environment variables and reference the environment variables in the command.

In this example, the command output is redirected to the output.log file. The output lists the URL report link and lists the analysis rule results.

/opt/IBM/SoftwareAnalyzerEE/eclipse -nosplash -data /home/builder/workspace.rsaree -application com.ibm.rsaz.analysis.commandline.AnalyzeApplication -rulefile /home/builder/rules/rules.dat -exportDirectory /home/builder/exports -reportDirectory /opt/IBM/SoftwareAnalyzerEE/tomcat/webapps/ROOT/rsar/reports -directory /home/builder/workspace/projectname/src -verbose > output.log
RSAR is no longer supporting Any task today