C and C++ SoftBench User's Guide
Using SoftBench CodeAdvisor
Performing the "Check Code" Operation
Chapter 6150
If some of your compiles take place in directories other than your build
directory you need to set the SB_DBNAME environment variable prior
to building. Set SB_DBNAME to the path of the static database file
expected by SoftBench CodeAdvisor (i.e.,
SB_DBNAME=
builddir
/Static.sadb;export SB_DBNAME where
"
builddir
" is the "Build Directory" specified in the "Create Project"
dialog box).
Refer to the SoftBench Online Help node for "SoftBench How To" for
details on preparing your programs for SoftBench CodeAdvisor.
Accessing SoftBench CodeAdvisor
1. From the main SoftBench window select the Expand >> button. The
Builder and SoftBench CodeAdvisor roll-out area appears.
2. Select the CodeAdvisor tab at the bottom of the roll-out area. See
Figure 6-1.
Selecting Rule Groups
You can either use the default rules "Definite Defects" and "Probable
Defects", or you can choose the rules you want to check your code
against.
1. If not already selected, select the Expand >> button on the SoftBench
main window to open the roll-out area.
2. Select the CodeAdvisor tab. The configured rule groups appear at the
top of the SoftBench CodeAdvisor area.
3. Activate the desired rule groups by selecting the appropriate radio
buttons.
If necessary, use the Rule Group Help… button to access rule group
descriptions.
Checking Your Program
If you have successfully built your program, select the Check Code button
on the SoftBench main window to update the database and initiate rule
checking. SoftBench displays a spinning clock while SoftBench
CodeAdvisor completes your code check.
SoftBench CodeAdvisor only checks files and/or targets selected (or all