This topic describes how to select the scope and the rules
of a software analysis configuration.
This topic contains the following subtopics:
Selecting the scope and
the rules
Follow these steps:
- Open the software analysis configuration editor. See Opening the software analysis configuration editor.
- In the left pane of the editor, create a new software analysis
configuration, or create one based on an existing configuration.
- Creating a new configuration: To create a
new software analysis configuration, do any one of the following:
- Click
on the toolbar.
- Right-click any node in the Software Analyzer tree
and then click New.
- Double-click the Software Analyzer node
at the top of the tree.
- Duplicating a configuration: To
create a new configuration based on an existing one, do one of the
following:
- Select the existing configuration in the Software Analyzer tree
and then click
on the toolbar.
- Right-click the existing configuration in the Software
Analyzer tree and then click Duplicate.
Note: - If the button or the menu item is disabled, then enable it by
selecting any node in the Software Analyzer tree.
- If the Software Analyzer tree is not visible,
show it by clearing the filter input field.
- In the Name field, enter a name for the
new software analysis configuration.
- On the Scope tab, select a scope for the
new software analysis configuration. The scope identifies the source
code files to which the software analysis is to be applied. Table 1 shows the values
that can be selected:
Table 1. Scope values| Scope selection: |
Resulting scope: |
| Analyze entire workspace |
All the source code files in the workspace. |
| Analyze a resource working set |
All the source code files in the selected resource
working set. |
| Analyze selected projects |
All the source code files in the selected projects. Note: The projects in this list are filtered according to
the settings in the Project Explorer view. To change these settings
click .
|
When you run the software analysis configuration you can
override the configured scope with a different scope. See Starting a code review; runtime scope.
- On the Rules tab, select the rules
that you want to be included in this analysis configuration. The meaning
of each rule is described in one of the following topics:
Tip: Hover over a rule to display a
description of it. You can also get information about a rule by selecting
the rule and pressing F1.
Follow
these steps:- In the Analysis Domains and Rules tree,
expand the COBOL Code Review or PL/I
Code Review domain.
- Expand a rule category, such as Program Structures.
- Select a rule, such as Avoid ACCEPT statements.
- On the Properties tab:
- Set the severity for the rule. Table 2 shows the values
that can be set for severity.
- Set the value of any custom parameter.
Table 2. Severity levels| Icon |
Severity level |
Description |
 |
Recommendation |
This is the lowest severity
level. The result indicates a problem that is not serious but one
that you should still fix. |
 |
Warning |
This severity level indicates
that a resource very likely has a problem that you need to resolve. |
 |
Severe |
This is the highest severity
level and indicates that you should resolve the problem. |
- Apply and Revert:
- Click Apply to save your changes.
- Click Revert to undo the changes since
the most recent Apply.
- Analyze and Close:
- Click Analyze to close the editor and run
the software analysis configuration.
- Click Close to close the editor.
Using built-in
rule sets
Use the built-in rule sets
to identify or enable rules that belong to special categories. The
current built-in COBOL and PL/I rules sets are:- COBOL rules added in RDz 8.0
- COBOL rules added in RDz 8.5
- COBOL Best Practices Code Review
- PL/I rules added in RDz 8.5
- PL/I Best Practices Code Review
To identify the rules belonging to a rule
set:
- Expand the Rule Sets list.
- Select a rule set, such as COBOL Best Practices Code
Review.
In the
Analysis Domains and Rules tree,
the rules belonging to the selected rule set are displayed in bold.
For example, if you select the COBOL Best
Practices Code Review rule set then the rules in that
set are displayed in bold under the COBOL Code Review node
of the tree.
To enable the rules belonging to
a rule set:
- Expand the Rule Sets list.
- Select a rule set, such as COBOL Best Practices Code
Review. The rules in the selected set are displayed in
bold under the COBOL Code Review node of the
tree.
- Select Set.
The check box for each rule in the set is selected, enabling
the rule.
For example, suppose that you want to
create an analysis configuration containing all of the best-practice
COBOL rules, except for two rules. To accomplish this:
- Select the rule set. In the tree, the rules in the rule set are
displayed in bold.
- Click Set. The check box for each rule
in the set is selected, enabling the rule.
- Clear the check boxes in front of the two rules that you do not
want to include in the code review.
- Click Apply to save the settings.