It is often the case that code that compiles cleanly may still contains runtime errors due to legal C/C++ code that the programmer did not intend, and there are numerous instances where although code may be linguistically correct, it does not adhere to recommended best practices.
Rational Developer for Power Systems Software provides static analysis tooling that can analyze your code prior to compile time in order to find potential sources of error.
In order to invoke analysis on your code, you must have it in a Remote C/C++ project and have indexed your code successfully. Typically this means you will wish to perform a full build of your code in the IDE at least once so that Rational Developer for Power Systems Software can examine your build output and properly configure the parser and indexer that will be used to scan and interpret the structure of your code.
When you are ready to scan your code, you will want to create a new Software Analysis Configuration. First, invoke the "Software Analysis Configurations..." dialog.

This will present a dialog containing any currently configured analysis configurations.

Create a new configuration by selecting the appropriate button. You will then be able to configure what portion of the workspace to run analysis rules upon.

Select the resources you wish and then select the Rules tab.

This will show you a list of rule providers and rules that you may select to be run. The C/C++ Analysis for Local/Remote Projects provider (shown below) provides the rules that are available for use on Local/Remote C/C++ projects. Other rule providers generally do not function correctly with Local/Remote C/C++ projects.

Select the rules you wish to run and then hit the "Analyze" button. The analysis will run and a progress dialog will be displayed.

Once the analysis finishes, the results will be shown in the Software Analyzer Results view.

Double-clicking on the results will take you to the source location where the problem was found.


© Copyright IBM Corporation 2011, 2013. All Rights Reserved.