Rational Programming Patterns provides templates of rules
to create customizable quality control rules.
RPP customizable rules are not directly available for
the design entities analysis and the COBOL source review. You must
create these rules and specify the parameters values to make them
available in Software Analyzer.
Implementation
To use a customizable rule,
you must first create the rule with one of the templates provided
in the Preferences of Software Analyzer.
- Select .
- Click the Add Rule button.
- In the wizard that opens up, select the category where the rule
will be added and click Next.
- Select the template to use for the rule and click Next.
- Enter the values of the template parameters and click Finish.
- The created rule appears in the Current Custom Rules list
of the Preferences window. Click OK to validate
this creation.
The new rule is automatically added and available in Software
Analyzer.
Before starting the analysis of the COBOL code taking
into account the new quality control rule,
you must first define a configuration rules set in the Software Analyzer
Configurations.
For a complete documentation on the Software
Analyzer, see the Rational Developer for System z online help, in
the COBOL Code Review item of the Developing section.
RPP specific templates
The following rules
templates are specific to Rational Programming Patterns:
- The Count specific lines template has the
parameters "Limit number of specific lines" and "Severity".
- The RPP / An inline PERFORM statement cannot exceed
the specified line number limit template has the parameters "Maximum
number of lines in in-line PERFORM statement" and "Severity".
- The RPP / Avoid CALL of user-definable routine template
has the parameters "Name of routine to avoid" and "Severity".
- The RPP / Avoid nesting IF statements deeper than the
specified number of levels template has the parameters "Maximum
number of levels for nested IF statements" and "Severity".
- The RPP / Avoid using the selected compiler directives template
has different compiler directives (BASIS, CBL, COPY, EJECT, REPLACE,
SERVICE LABEL, SERVICE RELOAD, SKIP, TITLE) and "Severity" as
parameters.
- The RPP / Avoid using the specified copybook template
has the parameters "Name of the copybook to avoid" and "Severity".
- The RPP / COBOL filename adheres to naming convention template
has the parameters "COBOL file name mask" and "Severity".
- The RPP / Procedure division statements cannot exceed
custom line number limit template has the parameters "Maximum
number of lines in procedure division" and "Severity".
- The RPP / Use a scope terminator phrase with the specified
COBOL statement type template has different statements
(IF, EVALUATE, READ, SEARCH, STRING, CALL) and "Severity" as
parameters.
- The RPP / Use comments to describe all paragraphs template
has the parameters "Comment location" and "Severity".
- The RPP / Use comments to describe all sections template
has the parameters "Comment location" and "Severity".
- The RPP / Use the specified prefix with condition names template
has the parameters "Condition name prefix" and "Severity".