Skip to main content

ZPA CLI

ZPA CLI is the standalone way to analyze PL/SQL and Oracle SQL from a terminal or CI pipeline. It scans a directory, loads the configured checks, and writes findings to the console or to SonarQube’s Generic Issue Data format.

Download

Latest release

3.0.1

Usage

Currently, the zpa-cli supports these options:

  • --sources: [required] Path to the folder containing the files to be analyzed.
  • --forms-metadata: Path to the Oracle Forms metadata file.
  • --extensions: File extensions to analyze, separated by comma. The default value is sql,pkg,pks,pkb,fun,pcd,tgg,prc,tpb,trg,typ,tab,tps.
  • --output-format: Format of the output. The default value is console.
  • --output-file: Path to the output file.
  • --config: Path to the configuration file. The file format must comply with the provided JSON schema. You can refer to the example zpa-config-example.json for guidance. If the configuration file is not provided, only the rules marked as "activated by default" will be executed.

Output formats:

  • console: writes the analysis result on the standard output
  • sq-generic-issue-import: generates a XML file using the "Generic Issue Data" format that can be used in SonarCloud or in a SonarQube server (as an alternative to the dedicated ZPA Plugin for SonarQube).

Example

Run an analysis and write SonarQube Generic Issue Data:

./zpa-cli/bin/zpa-cli --sources . --output-file zpa-issues.json --output-format sq-generic-issue-import