AuditsCLI.EXE, the Command Line Audits and Metrics Tool
Go Up to Command-Line Utilities Index
AuditsCLI.EXE is the command-line Audits and Metrics tool. It runs the command-line version of Audits or Metrics, depending on whether the --audits
or --metrics
option is specified in the command line.
- Warning: Notice that AuditsCLI.EXE can be used only with Delphi projects.
Contents
Command-Line Syntax
To display the command-line help, enter:
AuditsCLI {-h|--help}
To run Audits, use the command line:
AuditsCLI --audits --{html|xml} CompilerOptions ^
[--config=AuditsConfigurationFile.ADT] [-o OutputFile] ProjectName.DPROJ
To run Metrics, use the command line:
AuditsCLI --metrics --[html|xml] CompilerOptions ^
[--config=MetricsConfigurationFile.MTS] [-o OutputFile] ProjectName.DPROJ
Command-Line Options
You can use the following command line options:
Option | Description |
---|---|
|
One of these options can be specified to display the short help in the console window. |
|
One of these options must be specified.
|
|
One of these options must be specified:
|
|
Specifies some options related to the Delphi compiler (see DCC32.EXE, the Delphi Command Line Compiler.) You can use the following options:
|
|
Specifies the file storing a set of Audits or Metrics to analyze. The activated analysis will process only audits or metrics stored in this set.
Configuration files can be created from the IDE. Use the QA Audits and QA Metrics dialog boxes to customize the sets of active audits and active metrics. Then use the Save audit set or Save metric set button on these dialog boxes to save the customized sets of audits or metrics in configuration files. If the |
|
|
|
Specifies the Delphi project file. This file must have the |
Command-Line Examples
The following example demonstrates the running of the command-line Metrics:
AuditsCLI.exe --metrics --html^
--config="C:\Users\<user>\Documents\Embarcadero\Studio\Projects\MyMetrics.mts"^
-U"C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\release"^
-o "C:\Users\<user>\Documents\Embarcadero\Studio\Projects\p1\QA\MyMetricsResults.html"^
"C:\Users\<user>\Documents\Embarcadero\Studio\Projects\p1\Project1.dproj"
Here:
- The
--html
option defines that Metrics results will be generated in the HTML format. - The
MyMetrics.mts
file stores the set of metrics to process. This file should be previously created from the QA Metrics dialog box. - The
-U
option defines that the command-line Metrics will search for compiled units in the
C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\release
folder.
- The
-o
option defines that AuditsCLI.exe will save the generated Metrics results in theMyMetricsResults.html
file. - The
Project1.dproj
file should be the project file whose source code is to be analyzed by the command-line Metrics.
The following example demonstrates the running of the command-line Audits:
AuditsCLI.exe --audits --html^
--config="C:\Users\<user>\Documents\Embarcadero\Studio\Projects\MyAudits.adt"^
-U"C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\release"^
-I"C:\Program Files (x86)\Embarcadero\Studio\22.0\lib";"C:\Program Files (x86)\Embarcadero\Studio\22.0\include"^
-DDEBUG;DEVELOPERS;^
-o .\MyAuditsResults.html^
"C:\Users\<user>\Documents\Embarcadero\Studio\Projects\p1\Project1.dproj"
Here:
- The
-I
option defines that the command-line Audits will use the
C:\Program Files (x86)\Embarcadero\Studio\22.0\lib
andC:\Program Files (x86)\Embarcadero\Studio\22.0\include
include directories.
- The
-D
option defines that the command-line Audits will use theDEBUG
andDEVELOPERS
conditional compilation symbols. - The relative path used in
.\MyAuditsResults.html
file means that this file should be created in the project root directory
C:\Users\<user>\Documents\Embarcadero\Studio\Projects\p1
, specified by the project file option.