Numbering and Categorisation Scheme
The guidelines have been renumbered, extended, categorised by severity (blocker, critical, major, minor and info) and assigned to one or more SQALE characteristics (changeability, efficiency, maintainability, portability, reliability, reusability, security and testability).
This new categorisation allows to sort issues by severity. The most important issues will be listed first, even if you do not disable less important guidelines.
Severity and characteristics may now be used beside guideline numbers in check and skip lists (include and exclude lists).
Would you like to create your own guidelines? Or extend the existing guidelines? Then validators are your friends. A validator is a Java class implementing the PLSQLCopValidator interface. Validators may be used in the command-line utility, in SonarQube and the SQL Developer extension.
A complete example is provided with source code as a Maven project. This example extends the default validator by 15 additional guidelines to check naming conventions according to chapter 2.2 of the Trivadis PL/SQL & SQL Coding Guidelines 3.2. The following screenshot shows the violation of a custom guideline (G-9013: Exceptions should start with ‘e’) within SonarQube.
PL/SQL Editor for Eclipse
The editor is mainly provided to understand the PL/SQL model better. The full model is available as a PLSQL.ecore file, which may be explored best within the Eclipse IDE. Understanding the PL/SQL model is important if you plan to develop your own validators.
Use the plsqleditor.zip file in the Eclipse folder to install the PL/SQL editor in Eclipse. The editor supports an outline view, syntax colouring, bracket matching, code formatting and error integration into the Eclipse workbench.