Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed May 9, 2021
1 parent a1d0a39 commit dc7ba9c
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,40 @@

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.

The first version will generate a file in the ["Generic Issue Data" format](https://docs.sonarqube.org/latest/analysis/generic-issue/) to use in SonarCloud or in a SonarQube server (as an alternative to the dedicated [Z PL/SQL Analyzer Plugin](https://github.com/felipebz/zpa)).
## Downloading

See the [demo project on SonarCloud](https://sonarcloud.io/project/issues?id=utPLSQL-zpa-demo&resolved=false)!

Official releases are available for download on the ["Releases" page](https://github.com/felipebz/zpa-cli/releases).

## Requirements

* Java 11 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`.
* `--output-file`: Path to the output file. The default value is `zpa-issues.json`.

The output file follows the ["Generic Issue Data" format](https://docs.sonarqube.org/latest/analysis/generic-issue/) and it 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 .`

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)!

0 comments on commit dc7ba9c

Please sign in to comment.