Create a baseline analysis configuration
to scan only for rule violations that are introduced by changes to
a previous version.
Before you begin
The
instructions are written for the following simple scenario. A local z/OS® project contains established
source code files that include some coding violations. You plan to
add new features to the project. You want to be able to run code reviews
on the project that show only the coding violations in the source
code that you add to the project.
Before you can create a baseline
analysis configuration, you must create an ordinary software analysis
configuration for the project:
- Set the scope to be the project.
- Select a set of coding rules that you want to apply to the project.
Procedure
To create a baseline analysis configuration, follow the
steps below.
- Open the software analysis configuration window.
To open the window, right-click a local project in the project explorer
view and click . For more information, see Opening the window.
- Verify that the window is in baseline analysis
configuration mode. See Changing the window mode.
- In the left pane, right-click Baselined Software
Analyzer and click New. The Configuration tab opens on
the right side of the window.
- In the Name field, type a name for
the new baseline analysis configuration.
- On the Configuration tab, in the
"Software analysis configurations" group, which is at the top of the
tab, select the software analysis configuration that you created in Before you
begin.
- On the Configuration tab,
in the "Baseline archives" group, create a baseline archive for the
project. Follow the steps below. For more information, see Creating a baseline archive.
- Click New.
- In the New Baseline window, in
the Baseline name field, type a name for the
new baseline archive.
- Select Baseline using a new analysis.
- Expand the list of software analysis configurations
and select the configuration that you created in Before you
begin.
- Click OK.
A code review is run against the project with the software
analysis configuration that you created in Before you
begin. A new baseline archive is created, and copy of the results
of the code review is stored in it. The archive is added to the list
of baseline archives in the software analysis configuration window
and is automatically selected.
- To save the baseline analysis configuration, press Ctrl-S
or click Apply.
- Close the software analysis configuration window.
What to do next
The new baseline analysis
configuration contains the following items:
- A software analysis configuration to run against your project
- A baseline archive that contains a record of the coding violations
in the current version of the project.
As you add source code to the project, you can run the baseline
analysis configuration to look for coding violations. The code review
runtime component searches for violations only in the source code
that you add to the project.
You are now ready to run the baseline
analysis configuration. See Running a code review.