Quality Control of the Software Development Kit

IBM® Developer for z Systems™ (Rational® Developer for z Systems) and Linux provide the Software Analyzer tool that developers can use to ensure that their code conforms to their company's best practices. Rational Programming Patterns extends this tool to provide an analysis support for design entities and specific code from selected rules. The elements that do not conform to these rules are detected.

The Software Development Kit of Rational Programming Patterns provides rules that complement the standard rules of Software Analyzer:
  • The rules that analyze the design entities are gathered under Design Entities Analysis for RPP SDK. They control that all the instances have a label and at least one keyword.
  • The rules that analyze the code that is generated from a Source Code instance are gathered under Source Code Analysis for RPP SDK:
    RPP / Never override a generated line
    Use this rule to ensure that no generated line is overridden.
    RPP / Never have Source Code desynchronized with its models in a local workspace
    Use this rule to ensure that the code that is generated from a Source Code instance is synchronized with all the design files that were involved in its local generation.
    Note: The generated code of COBOL Programs or COBOL Copybooks is analyzed from the quality control rules of the Pacbase facet.
Before you start an analysis, you must open the Software Analyzer Configurations wizard to define a configuration rule set. To do so, right-click a file or a project and select Software Analyzer > Software Analyzer Configurations. The wizard Create, manage and run configurations opens. To create a configuration, right-click the line Software Analyzer in the list of configurations and give it a name in the Name field. Specify the following information:
  • In the Scope tab, indicate whether the analysis applies to the entire workspace, a working set, or one or more selected projects.
    Figure 1. Rational Software Analyzer - Scope tab
    Rational Software Analyzer - Scope tab

  • In the Rules tab, select the rules for the analysis. For each selected rule, you can specify the severity level (recommendation, warning, or severe).
    Figure 2. Rational Software Analyzer - Rules tab
    Rational Software Analyzer - Rules tab
To start the analysis, right-click a file or a project. Select Software Analyzer and the rule set that was previously defined. The Software Analyzer Results view displays the list of the broken rules in a tree-like structure. The first level represents the category. The second level is the rule. The last level lists the instances in error. To see the details of a violation, right-click the file and select View Result. The generated file opens in the editor where the violation was detected and the line in violation is highlighted.
Figure 3. Software Analyzer results
Software Analyzer results

Correct the violations and save. Then, you can start the analysis again to check that all the rules are respected.

If you use the application programming interface, you can create your own quality control rules that target the design entities or the generated source code (other than the COBOL code). For more information, see Customized micropatterns, patterns, or quality control rules for the Software Development Kit.


Feedback