NOTE: You can use the -diagoption along with other filtering options, such as -exclude,

-include, and -severity. For more information, see “Report options interoperability” (page 40).

The following example shows the report for a specific diagnostic number.

Example 25 Printing report for a specific diagnostic number(s)

$ cadvise report -pdb testpdb -diag 2549

Report generated using "HP Code Advisor C.XX.XX [Release Time]" on <machine> at <Report Time>

Report command line: " cadvise report -pdb testpdb -diag 2549"

"a.c", line 14: warning #2549-D: variable "struct_obj" is used before its value is set

LocalVar = struct_obj.a ;

^

"b.c", line 6: warning #2549-D: variable "b" is used before its value is set c = b;

^

"b.c", line 7: warning #2549-D: variable "a" is used before its value is set

b = a;

^

6.8 Generating reports based on severity

The -severity N option is used to emit messages with severity >= N. The valid values for N are 1 to 9, where 9 indicates the highest severity. If this option is not specified, the default severity is taken as 5. This option does not affect the output of -summary, which still prints the complete summary.

NOTE: You can use the -severityoption along with other filtering options, such as -exclude, -diag, and -include. For more information, see “Report options interoperability” (page 40).

The following example shows the command to generate report based on severity.

Example 26 Generating reports based on severity

$ cadvise report -pdb test.pdb –all –severity 2.

This command prints all diagnostics of severity levels greater than or equal to two.

6.9 Suppressing diagnostics for specific files

The -exclude <string1:string2:...:stringN> option helps to eliminate diagnostics for files that contain any of the strings from 1 to n in the file.

NOTE: You can use the -excludeoption along with other filtering options, such as -diag, -include, and -severity. For more information, see Report options interoperability.

The following example shows the elimination of strings from a file.

6.8 Generating reports based on severity

31

Page 31
Image 31
HP UX Web Development Tools manual Generating reports based on severity, Suppressing diagnostics for specific files