Getting started
This guide takes you from a PL/SQL project to its first findings in SonarQube. You need a running SonarQube Community Build (see Compatibility) and the SonarScanner CLI.
Not using SonarQube? Run the ZPA CLI instead: zpa-cli --sources . prints the findings in the terminal.
1. Install the plugin
Download the ZPA plugin from the Install guide, copy the .jar to
SONARQUBE_HOME/extensions/plugins and restart SonarQube.
2. Configure the project
Create a sonar-project.properties file in the root of your project:
sonar.projectKey=my-plsql-project
sonar.projectName=My PL/SQL project
sonar.sources=src
sonar.sources is the folder with your PL/SQL files. By default ZPA analyzes files with the extensions sql, pkg,
pks and pkb; to add others, set sonar.plsqlopen.file.suffixes (see Scanning code).
3. Run the analysis
From the project root, run SonarScanner with a SonarQube token:
sonar-scanner -Dsonar.host.url=http://localhost:9000 -Dsonar.token=<your-token>
4. Review the findings
Open the project in SonarQube. The Issues tab lists the findings of the rules active in the quality profile; each issue links to the rule description, also available in the rule catalog.