Parameters of the code review application command for Windows
The code review application command requires parameters to specify a workspace, projects or directories to be processed, a rule file, and an output file.
The application parameters of the code review application are shown in Table 1.
Parameter | Type | Description |
---|---|---|
-application | Required | com.ibm.rsaz.analysis.commandline.AnalyzeApplication Use this parameter to specify the Eclipse application
identifier of the code review application. Specify the identifier
exactly as shown: |
-data | Required | This parameter specifies the
path of the Eclipse workspace that the code review application uses.
It must be a fully qualified path. If the specified workspace
does not exist, it is created. If you also use the If you do not specify either the |
-rulefile | Required | This parameter specifies the fully qualified
path of a rule file that contains a set of code review rules and their
assigned severities. The code review application applies
these rules to the projects or files that are specified when you start
the application. For COBOL, the rules can include custom categories and rules and user-written rules. Rules for COBOL, PL/I, and Java™ can be contained in the same rule file. During processing, the code review application determines the programming language of each source code file that it finds. It then applies to it the rules that are applicable to that language. The
rule file must have the extension You create the rule file by clicking Export to export selected rules from the software analysis configuration window. |
-projects
-directory |
Optional | Each of these parameters specifies
the locations of source code files to be analyzed. You can also use
the parameters -includefile and -excludefile to
include or exclude specific files. Use -projects when the source code files are in a project inside the workspace that you specify in the -data parameter. Use -directory when the source code files are in a directory outside the workspace that you specify in the -data parameter. If both -projects and -directory are omitted, the code review application analyzes the source code files in all of the projects in the specified workspace. If -projects P1[, P2, P3 ...] is specified, the application processes all the source code files in the comma-separated list of projects P1, P2, P3...... If -directory D1[, D2, D3, ...] is specified, the application processes all the source code files in the comma-separated list of directories D1, D2, D3, ..... If both -projects and -directory are specified, the application processes the -projects parameter and ignores the -directory parameter. Temporary projects that are created with the -directory parameter: The following information applies to directories located outside the workspace that is specified in the -data parameter. Use of the -directory parameter
has 2 effects:
CAUTION: Do not use the -directory option
to specify directories that are located inside the workspace that
you specify in the -data parameter. Doing so
creates temporary projects in the workspace that are Eclipse linked
resources that are linked to the specified directories. Deleting
a temporary project incorrectly can cause your original project, folders,
or source code files to be deleted. For information about deleting
temporary directories, see Deleting temporary projects created by the -directory parameter.
|
-includefile | Optional | This parameter is used only
when the -directory parameter is present. It
specifies the fully qualified path of a text file that contains a
list of source code files to be analyzed, one file per line. When both the -directory parameter and the -includefile parameter are present, the code review application analyzes only those source code files that are specified in the include file and that occur in one of the directories that are specified in the -directory parameter. Each entry in the include file must be either a file name or a relative path plus a file name. The code review application searches for each entry in each of the specified directories. |
-excludefile | Optional | This parameter is used only
when the -directory parameter is present. It
specifies the fully qualified path of a text file that contains a
list of source code files to be excluded from analysis,
one file per line. When both the -directory parameter and the -excludefile parameter are present, the code review application excludes from analysis those source code files that are specified in the exclude file and that occur in one of the directories that are specified in the -directory parameter. All files that are not excluded are analyzed. Each entry in the exclude file must be either a file name or a relative path plus a file name. The code review application searches for each entry in each of the specified directories and excludes the file if it is found. |
-exportdirectory | Required | This parameter specifies the
fully qualified path of the directory to which the code review application
writes its output data files. These data files can be used as input to other applications. All the supported types of output data files are generated. If this parameter is omitted, no output data files are generated. However, the application still writes output information to standard output, if that option is specified. |
-nosplash | Optional | This parameter suppresses the display of the Eclipse splash screen. |
-verbose | Optional | This parameter causes the
code review application to write output information to standard output. On the Windows operating
system, to capture output information you must not only specify the
-verbose
parameter but also redirect standard output to a file on the command
line: |
>output_file | Optional | Use this redirection on the
command line to capture the application output information in a file. On Windows, you must also specify the -verbose parameter to get output information. |