eclipse_directory\eclipse | eclipse.exe
-application com.ibm.rsaz.analysis.commandline.AnalyzeApplication
-data workspace_directory
-rulefile rule_file
[-projects P1[, P2, P3, ...] |
-directory D1[, D2, D3, ...]]
[-includefile include_file]
[-excludefile exclude_file]
-exportdirectory export_directory
[-nosplash]
[-verbose]
[ >output_file]
where:
eclipse_directory\eclipse | eclipse.exe is the fully qualified path of the Eclipse executable file. Use eclipse for Linux or eclipse.exe for Windows.
-application com.ibm.rsaz.analysis.commandline.AnalyzeApplication is the name of the code analysis component.
-data workspace_directory is the fully qualified path of the Eclipse workspace that you are using.
-rulefile rule_file is the fully qualified path of a .dat file containing a set of rules and severities that you exported from the analysis configuration editor.
-projects P1[, P2, P3, ...] is a comma-separated list of projects in the workspace that contain source files.
-directory D1[, D2, D3, ...] is a comma-separated list of directories that contain source files.
-includefile include_file is a file containing a list of files to be included in the code review.
-excludefile exclude_file is a file containing a list of files to be excluded from the code review.
-exportdirectory export_directory is the fully qualified path of a directory where output data files are written.
-nosplash suppresses the display of the Eclipse splash screen.
-verbose causes output information to be written to standard output.
> output_file is a text file which captures output information written to standard output.
Table 1 describes the application parameters of the code review application:
| Header | Type | Description |
|---|---|---|
| -application | Required | com.ibm.rsaz.analysis.commandline.AnalyzeApplication This parameter specifies the identifier of the Eclipse application to be invoked. Use the text string shown above, which identifies the code review application. |
| -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. |
| -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 specified in the invocation. For COBOL the rules can include custom categories and rules and user-written custom rules. |
-projects |
Optional | These two parameters specify
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 located in a project inside the workspace that you specify in the -data parameter. Temporary projects created with the -directory parameter: The following discussion applies to directories located outside the workspace specified in the -data parameter. Use
of the -directory parameter has two side effects:
CAUTION: Do not use the -directory option
to specify directories located inside the workspace that you
specify in the -data parameter. Doing so creates
temporary projects in the workspace that are Eclipse linked resources
linked to the specified directories. Deleting a
temporary project incorrectly can cause your original project, folders,
or source code files to be deleted. 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 containing 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 specified in the -directory parameter. |
| -excludefile | Optional | This parameter is used only
when the -directory parameter is present. It specifies
the fully qualified path of a text file containing 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 specified in the -directory parameter. All files that are not excluded are analyzed. |
| -exportdirectory | Required | This parameter specifies the
fully qualified path of the directory to which the code review application
writes its XML and CSV output data files. These data files can be used as input to other applications. All the supported types of output data files are generated. |
| -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. Note: 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. |
These sample invocations illustrate how to invoke the code review application. Enter the invocation as one line on the Linux or Windows command line:
C:\progra~1\IBM\SDP\eclipse.exe
-application com.ibm.rsaz.analysis.commandline.AnalyzeApplication
-data "C:\RDz 85 workspaces\workspace_851_0914"
-rulefile "C:\RDz 8.5\CodeQuality\results\cobolRules.dat"
-projects "My COBOL project 0001","My COBOL project 0002"
-exportdirectory "C:\RDz 8.5\CodeQuality\CommandlineResults\Results851"
-nosplash
-verbose > c:\commandlineResults\out851_0916_COBOLProjects.txt
C:\progra~1\IBM\SDP\eclipse.exe
-application com.ibm.rsaz.analysis.commandline.AnalyzeApplication
-data "C:\RDz 85 workspaces\workspace_851_0914"
-rulefile "C:\RDz 8.5\CodeQuality\results\PL1Rules.dat"
-directory "C:\CheckSourceCode\PL1_Files_0001"
-excludefile "C:\RDz 8.5\CodeQuality\directoryExcludeFiles.txt"
-exportdirectory "C:\RDz 8.5\CodeQuality\CommandlineResults\Results851"
-nosplash
-verbose > c:\commandlineResults\out851_0916_PL1Projects.txt
20121008_101746
The output information is the information that the code review application writes to standard output. It includes a report link, a list of results, and a result count.
[url]http://server:9090/rsar/reports/20121004_162226/[/url]
The list of results lists each rule one at a time, followed by a list of the source code files and line numbers where the rule was applied.
The result count states the total number of times that a rule was applied, for all the listed rules.
When you delete a temporary project that was created as a link to a directory specified in the -directory parameter, take care to follow the recommended procedure for deleting an Eclipse resource link, so that you do not delete any of the contents of the corresponding directory in the file system.