Activating Code Review for COBOL
Use the following steps to activate the Code Review for COBOL function.
Procedure
- Set properties for the code review rules in the Common.cfg file.
In the CodeReview section of the Common.cfg file, review and adjust property settings, as appropriate, to expose (or ignore) the code review issues of interest to your organization. Set the property for each code review rule to one of the following four values:
- ignore : Do not flag this issue. This is the default setting for each rule.
- informational: Flag this issue as informational.
- warning : Flag this issue as a warning.
- error: Flag this issue as an error.
If you change any of the property settings, the application server must be restarted to refresh the settings.
- In the CodeReview section of the Common.cfg file, set the automaticExecution property to true. The default is false. This function is available only on the Windows platform. When set to true, the code review is run automatically during the scan process.
- Perform any of the following actions on the "Program
details" page of a COBOL program.
These actions are available on Windows and z/OS® platforms for COBOL programs with an Analysis status equal to Completed.
- Select the Show control flow diagram action.
- Select the View dead code action.
- Select the Code review tab.
The first time any of the actions are performed, the code review issues are detected, persisted in the metadata repository, and rendered. Subsequently performing any of the actions for the same program skips the detection and renders the results from the metadata repository. Reanalyzing a program clears the code review issues in the metadata repository.
The code review issues are rendered in a table comprised of three columns: Severity, Issue and Count.- Severity
- Indicates the severity level as determined by the settings in the Common.cfg file, and is displayed in the table as informational, warning, error or ignore.
- Issue
- The name of the detected code review issue.
- Count
- The number of occurrences of the detected code review issue.
- Count = 0 - Indicates no occurrences of the issue.
- Count > 0 - Indicates the number of unique occurrences of the issue.
- Count = n.a. - Indicates the severity level of the detected issue is ignore.