Rational Developer for System z

Starting a code review; runtime scope

This topic describes how to start a code review and how to temporarily override the scope specified in the software analysis configuration.

The scope of a software analysis configuration is set in the software analysis configuration editor to be either the entire workspace, a resource working set, or a selected project or projects. See Selecting the scope and the rules of a configuration.

When you start a code review you can temporarily override the scope specified in the analysis configuration. As Table 1 shows, the actual runtime scope is determined by the method that you use to start the code review:

Table 1. The start method determines the runtime scope
Start method: Runtime scope:
The down arrow beside the Software Analysis Software Analysis button on the Eclipse toolbar. The scope set in the software analysis configuration.
The Analyze button in the software analysis configuration editor
A popup menu in the project explorer The projects or source files selected in the project explorer view.
A popup menu in the editor The source file opened in the editor.
The following subtopics describe the steps for each of the methods of starting a code review.

Starting from the main toolbar

This method runs the code review using the scope specified in the selected software analysis configuration. Follow these steps:
  1. Click the down arrow beside the Software Analysis Software Analysis button on the main toolbar.
  2. Click the name of the software analysis configuration that you want to run.

The code review is run using the scope specified in the selected configuration.

Starting from the software analysis configuration editor

Like the previous method, this method runs the code review using the scope specified in the software analysis configuration. Follow these steps:
  1. Open the software analysis configuration editor.
  2. In the left pane, select the analysis configuration that you want to run.
  3. Click Analyze.

The editor closes and the code review is run using the scope specified in the selected configuration.

Starting from a project explorer view

This method runs the software analysis on the projects or source files that are selected in the current project explorer view. Follow these steps:
  1. In the project explorer view, select the projects or files to which you want the software analysis to be applied.
  2. Right-click one of the selected projects or source files and then click Software Analyzer.
  3. Click the name of the software analysis configuration that you want to use.

The code review is run on the selected projects or files, using the rules specified in the selected analysis configuration.

Starting from the editor

This method runs the software analysis on the source code file currently opened in the editor. The editor can be the COBOL editor, the PL/I editor, or the System z® LPEX editor. Follow these steps:
  1. Open a source code file in the editor.
  2. Right-click the text area and then click Software Analyzer.
  3. Click the name of the software analysis configuration that you want to use.

The code review is run on the file opened in the editor, using the rules specified in the selected analysis configuration.

Note: This method can be used to run either a local or a remote source code file. However, this method is the only way to run a code review on a remote source code file (see A limitation on code review of remote files).


Feedback