Using SoftBench CodeAdvisor

Performing the "Check Code" Operation

files if a project is selected). For example, if a violation depends on code in two files and you have only selected one of them for checking, SoftBench CodeAdvisor cannot detect the violation. Even if the file selected contains the actual violation, the other file was not selected, so SoftBench CodeAdvisor cannot detect the error. To safeguard against missing violations, select all files and filter out those files whose violations you don't want to see.

Viewing Violations

SoftBench CodeAdvisor scans your program and lists rule violations as it encounters them. SoftBench CodeAdvisor displays violations in the SoftBench CodeAdvisor Browser, where you can browse them just like build errors.

1. Double-clickviolations with the mouse, or select the First, Next, Previous, Last, or Selected buttons, to view or edit the source code that triggered the violation. See Figure 6-1.

 

2.

Using your pre-configured editor, fix the error and save the file. For

 

 

information on configuring editors, see “Configuring an Editor” on

 

 

page 119.

 

3.

If you do not understand the violation, you can request help on the

 

 

violation by selecting it and then selecting Violation Help. The online

 

 

help explains the rule and describes the type of code that triggers the

 

 

violation.

Figure 6-1

Violations Display

Chapter 6

151

Page 151
Image 151
HP UX SoftBench Software manual Viewing Violations, Violations Display