https://github.com/felipebz/zpa-cli
Command-line interface for ZPA.
https://github.com/felipebz/zpa-cli
plsql plsql-analyzer sql-analyzer static-code-analysis
Last synced: 8 days ago
JSON representation
Command-line interface for ZPA.
- Host: GitHub
- URL: https://github.com/felipebz/zpa-cli
- Owner: felipebz
- License: lgpl-3.0
- Created: 2019-02-25T21:00:42.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2026-02-02T15:55:49.000Z (10 days ago)
- Last Synced: 2026-02-02T18:11:12.574Z (10 days ago)
- Topics: plsql, plsql-analyzer, sql-analyzer, static-code-analysis
- Language: Kotlin
- Homepage: https://zpa.felipebz.com
- Size: 635 KB
- Stars: 27
- Watchers: 0
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ZPA CLI
[](https://github.com/felipebz/zpa-cli/actions/workflows/build.yml)
This is a command-line interface to the [Z PL/SQL Analyzer](https://github.com/felipebz/zpa). It is a code analyzer for Oracle PL/SQL and Oracle Forms projects.
## Downloading
Official releases are available for download on the ["Releases" page](https://github.com/felipebz/zpa-cli/releases).
## Requirements
* Java 17 or newer
## 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](https://github.com/felipebz/zpa/wiki/Oracle-Forms-support).
* `--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](schema.json).
You can refer to the example [zpa-config-example.json](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](https://docs.sonarqube.org/latest/analysis/generic-issue/) that can be used in SonarCloud or in a SonarQube server (as an alternative to the dedicated [Z PL/SQL Analyzer Plugin](https://github.com/felipebz/zpa)).
### Example
Running an analysis:
`./zpa-cli/bin/zpa-cli --sources . --output-file zpa-issues.json --output-format sq-generic-issue-import`
Then you can send the results to a SonarCloud or SonarQube server setting the `sonar.externalIssuesReportPaths` property:
```
sonar-scanner
-Dsonar.organization=$SONARCLOUD_ORGANIZATION \
-Dsonar.projectKey=myproject \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.externalIssuesReportPaths=zpa-issues.json
```
Check the [demo project on SonarCloud](https://sonarcloud.io/project/issues?id=utPLSQL-zpa-demo&resolved=false)!
## Contributing
Please read our [contributing guidelines](CONTRIBUTING.md) to see how you can contribute to this project.