Customizing your scan
 |
| |
| To customize your file scanning, specify filtering options either on the command line
or by creating a .scanrc configuration file. |
| |
| This document contains: |
Using command line options
 |
| |
| The command line form for option use is: |
scandetail [option(s)] source_files
or
scansummary [option(s)] source_files
For example, the following command line operation indicates that all .cc files should be scanned for
critical, obsolete or changed impacts (disregarding nonstandard, warning, or enhancement
impacts, as well as non-critical impacts):
scandetail +S Cr -T Ns,Wn,En *.cc
See Using scandetail and scansummary for more information on
the file scanners. See filtering options or scandetail(1) for a description of the file scanner options.
Creating a .scanrc configuration file
 |
| |
| The STK file scanner database contains information about every changed or obsoleted API and command from HP-UX
10.20 through the latest release of HP-UX. To ensure that no potential problems are missed, the file scanners
(scandetail and scansummary) report every occurrence of APIs and commands in your source
code. For this reason, they tend to over report and can produce very long output reports. |
To shorten these reports and eliminate the irrelevant impacts, you can customize the operation of the scanners
with a .scanrc configuration file. This file specifies options that are applied each time you scan your
files. An example .scanrc is located in /opt/STK/examples/sample_scanrc, and contains lines
for many common file scanner options.
To create a .scanrc file that is optimal for your source base:
- Copy /opt/STK/examples/sample_scanrc to your home directory as .scanrc.
- Based on your knowledge of the source files you are transitioning, edit .scanrc so that it contains
the appropriate options. Uncomment the relevant lines in the file, or add lines if necessary. The table in filtering options contains a description of all the filtering options.
| Note:
Do not uncomment -T Ob. This prevents you from seeing impacts about obsolete APIs and commands, which
must be resolved if they apply to your code. |
Filtering options
 |
| |
| These options are applicable for both command line operation and for use within the .scanrc
file. |
| |
| Note:
Many options can be used with either a + or - (include or exclude). You can't use the
+ and - for any one option. For example, you cannot specify +T Ob and
-T En for one scan. The first instruction indicates that you want the scanners to only report obsolete
impacts and the second indicates that you want it to disregard enhancement impacts (which was implicit by the
first instruction). |
|
| option |
parameters |
description |
example |
OS transition:
Select the HP-UX version of your source platform or a range.
-O |
10.20 |
|
-O 11.00
This limits the scan to impacts from version 11.00 to the most recent release.
-O 11.00 - 11i
This limits the scan to impacts pertaining to versions 11.00 through 11i. |
| 11.00 |
|
| 11i |
|
| 11.20 |
11i version 1.5 |
| 11.22 |
11i version 1.6 |
impact severity
+S, -S
|
Cr |
critical |
+S Cr or -S
Nc
Either of these options limit the scan to critical impacts.
|
| Nc |
non-critical |
impact type
+T, -T
|
Ob |
obsolete |
-T Wn, En, Ns or
-T Wn -T En -T Ns
Only report obsolete or changed impacts. These can also be listed separately like they are in
.scanrc.
|
| Ch |
changed |
| Ns |
nonstandard |
| Wn |
warning |
| En |
enhancement |
impact class
+C, -C
|
UN |
unclassified |
+C IPF
Only include IPF impacts.
-C UN, DA
Disregard unclassified and date impacts. |
| 64 |
64-bit API |
| ST |
standards compliance |
| 32 |
32-64 bit interoperability |
| BI |
binary compatibility |
| NW |
networking |
| TH |
threads |
| DA |
date |
| ACC |
aC++ and C compiler |
| F90 |
Fortran 90 compiler |
| CBL4 |
COBOL 4.x compiler |
| IPF |
IPF architecture |
impact page
+I, -I
|
<impact number> |
The .scanrc file contains a complete
list of impact numbers.
See Overview of Impact Classifications for a description of each impact
classification. |
+I CrCh638 Only report instances of
critical change impact #638.
-I NcNs338, NcEn593
Report all impacts except non-critical, nonstandard impact #338 and non-critical, enhancement impact #638. |
output format
-o |
html |
The scanner output report defaults to
html format, but you can specify text format. |
-o text Create a text
impact report instead of an html report. |
| text |
identifier type
+Y, -Y |
F |
C/C++ functions |
+Y K,H,I
Only include impacts that are related to C/C++ keywords, header files, or identifiers.
-Y A,C
Exclude impacts related to UNIX arguments or commands. |
| H |
C/C++ header files |
| I |
C/C++ identifiers |
| K |
C/C++ keywords |
| M |
C/C++ member |
| Mf |
C/C++ member functions |
| S |
C/C++ structure |
| A |
UNIX arguments |
| C |
UNIX command |
| L |
library |
| P |
path |
| Ff |
FORTRAN functions |
| Fi |
FORTRAN identifiers |
| Fk |
FORTRAN keywords |
| Fs |
FORTRAN subroutine |
| Cc |
COBOL callable routine |
| Cf |
COBOL intrinsic function |
| Ck |
COBOL keyword |
message
-m
|
<message> |
Specify a message to appear in the title of the
output report. |
-m "new scan"
This causes the scansummary report title to be "hp-ux stk scansummary report: new scan."
|
output filename prefix
-p
|
<prefix> |
Replaces stk in the default report name
with <prefix>. |
-p "new"
This causes the scandetail report filename to be new_detail.html (the scansummary report would be
new_summary.html).
|
sort order (scandetail)
-s
|
lineno |
Sort output report by source file name and line
number. |
-s synopsis
By default, the scandetail output report sorts impacts by file name. The option above causes the output report to
sort by impact type instead.
|
| synopsis |
Sort output report by impacts. |
sort order (scansummary)
-s
|
class |
Sort output report by impact classification. |
-s class
By default, the scansummary output report is sorted by the number of instances of each impact detected. The
option above causes the output report to sort by the impact type instead.
|
verbose
-v
|
|
Produce verbose output to the screen. |
-v
The default is no verbose output.
|
See also
|