Releases: Trivadis/plsql-cop-cli
Releases · Trivadis/plsql-cop-cli
PL/SQL Cop v2.1.6
- Released on 2018-09-10
- Changed
- Support files with
.pck
extension and include pck in the default filter - Included preview/trial license is valid thru 2019-03-31
- Support files with
PL/SQL Cop v2.1.5
- Released on 2018-03-11
- Fixed
- Use default license location when an empty license parameter is passed. This enables the use of the SonarQube plugin without specifying a license file.
PL/SQL Cop v2.1.4
- Released on 2018-03-11
- Changed
- Included preview/trial license is valid thru 2018-09-30
PL/SQL Cop v2.1.3
- Released on 2017-09-22
- Fixed:
- Using quote delimiter character
~
(tilde) leads to parse errors - Parse error when using
COUNT
inpivot_clause
- Using quote delimiter character
- Changed
- Updated PLSQL Editor for Eclipse to version 2.1.8
PL/SQL Cop v2.1.2
- Released on 2017-08-15
- Fixed:
- Using concatenation operator
||
with whitespace between the vertical bars leads to parse errors
- Using concatenation operator
- Changed
- Updated PLSQL Editor for Eclipse to version 2.1.7
- Documented limitation regarding error_logging_clause, see Parser Limitations for examples
PL/SQL Cop v2.1.1
- Released on 2017-05-14
- New:
- Oracle 12.2.0.1 grammar support
- SQL*Plus
- History command
- SQL
- Analytic views
- Join groups
- Oracle sharding
- PDB lockdown profiles
ADMINISTER KEY MANAGEMENT
EnhancementsFLASHBACK DATABASE
EnhancementSELECT
Enhancement- New
COLLATE
Operator - New or Enhanced Expressions
- Enhanced Condition
- New or Enhanced Functions
- PL/SQL
ACCESSIBLE BY
clause Enhancements- Data-Bound Collation
- PL/SQL Expressions Enhancements
- Support for SQL JSON operators in PL/SQL (based on SQL changes)
- PL/SQL Coverage Pragma
- PL/SQL Deprecation Pragma
- Sharing Metadata-Linked Application Common Objects
- SQL*Plus
- All guideline examples have been extended by a reason. This reason is extracted into the rules.xml when creating the genmodel for the SonarQube plugin
- Oracle 12.2.0.1 grammar support
- Changed:
- Halstead based metrics may produce slightly higher values, since all data types are processed as operators
- Requires at least a Java 7 runtime environment
- Fixed:
- Parsing errors in
XMLELEMENT
and other functions when using certain non-standard function parameters
- Parsing errors in
PL/SQL Cop v2.0.3
- Released on 2017-02-12
- New:
- New simple example validator
com.trivadis.tvdcc.validators.GLP
to check naming of global variables (g_
), local variables (l_
) and parameters (p_
) only - Using new
AbstractValidatorTest
class for all validator unit tests
- New simple example validator
- Fixed:
- Wrong message for guideline 9003, use
c_
instead ofco_
prefix - Distinguish between markers and code excerpts in example validator
com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus
- Use dedicated JVM for each validator test to enforce instantiation of validator singleton
- Wrong message for guideline 9003, use
PL/SQL Cop v2.0.2
- Released on 2017-02-05
- New:
- Supporting Trivadis PL/SQL & SQL Coding Guidelines Version 3.2
- New guideline numbering scheme
- 13 new guidelines
- Check implemented:
- G-2230: Try to use SIMPLE_INTEGER datatype when appropriate.
- G-3150: Try to use identity columns for surrogate keys.
- G-3180: Always specify column names instead of positional references in ORDER BY clauses.
- G-3190: Avoid using NATURAL JOIN.
- G-7460: Try to define your packaged/standalone function to be deterministic if appropriate.
- G-7810: Do not use SQL inside PL/SQL to read sequence numbers (or SYSDATE)
- G-8120: Never check existence of a row to decide whether to create it or not.
- G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit.
- Check not yet implemented (requires
CREATE TABLE
andALTER TABLE
parser support, see ticket PLSQLCOP-212):- G-3160: Avoid virtual columns to be visible.
- G–3170: Always use DEFAULT ON NULL declarations to assign default values to table columns if you refuse to store NULL values.
- Check not planned to be implemented (checks per source file are not suited for this kind of guidelines):
- G-5010: Try to use a error/logging framework for your application.
- G-8410: Always use application locks to ensure a program unit only running once at a given time.
- G-8420: Always use dbms_application_info to track program process transiently
- Check implemented:
- Guidelines categorised by Severity: Blocker (2), Critical (7), Major (46), Minor (37), Info (1)
- Guidelines assigned to one or more SQALE characteristics: Changeability (10), Efficiency (20), Maintainability (48), Portability (7), Reliability (34), Reusability (3), Security (1), Testability (11)
- Guidelines assigned to one of the 31 SQALE subcharacteristics supported by SonarQube.
- Defined effort to solve for every guidelines using a remediation functions supported by SonarQube.
- Severity and SQALE characteristics are included in HTML and Excel outputs, issues are ordered by severity (Blocker, Critical, Major, Minor, Info)
- Provided guideline example files include the new bad and good examples according Trivadis PL/SQL & SQL Coding Guidelines Version 3.2 and have been renamed to include the version 3 and version 2 guideline identifiers, e.g. guideline_2150_12.sql
- Extended valid values for
check
andskip
command line options- Severities (blocker, critical, major, minor, info) may be used in
check
andskip
lists - SQALE characteristics (changeability, efficiency, maintainability, portability, reliability, reusability, security, testability) may used in
check
andskip
list - Guideline numbers, severities and SQALE characteristics may be combined in
check
andskip
lists
- Severities (blocker, critical, major, minor, info) may be used in
- New Command-line options
transonly={true|false}
– transform temporary XML file only, default is falsevalidator=<name>
– decendent of PLSQLJavaValidator, default iscom.trivadis.tvdcc.validators.TrivadisGuidelines3
- Validators are plug-ins now, the following validators are included:
com.trivadis.tvdcc.validators.TrivadisGuidelines3
– Trivadis PL/SQL & SQL Coding Guidelines Version 3.2 (default)com.trivadis.tvdcc.validators.TrivadisGuidelines2
– Trivadis PL/SQL & SQL Coding Guidelines Version 2.0com.trivadis.oracle.plsql.validation.EmptyPLSQLJavaValidator
– validator without checks, useful to produce code metrics only
- Custom validator as example
com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus
to be installed in plugin directory- Maven project, source code including unit tests for each guideline (bad and good cases)
- Example extends the validator
com.trivadis.tvdcc.validators.TrivadisGuidelines3
by 15 guidelines covering chapter 2.2 Naming Conventions for PL/SQL of Trivadis PL/SQL & SQL Coding Guidelines Version 3.2
- PL/SQL Editor for Eclipse
- Outline view matching PL/SQL model
- Syntax colouring
- Bracket matching
- Code formatting
- Error integration into Eclipse workbench
- Ecore model for PL/SQL grammar
- Classes with their Attributes
- Superclasses
- Supporting Trivadis PL/SQL & SQL Coding Guidelines Version 3.2
- Improved:
- Reduced parsing time for SQL files containing statements passed to the PL/SQL parser. Leads to an overall analysis time of 70% or less compared to version 1.0.21.
- JDK detection
- Fixed:
- McCabe’s cyclomatic complexity metric increased wrongly by ELSE in IF/CASE branches, by PL/SQL blocks and by GOTO statements
- Guideline 3120 (27) does not detect correlated subqueries without alias
- Guideline 4340 (42) does not detect collection method COUNT in basic loop statements when used with empty parenthesis ()
- Guideline 4350 (43) and guideline 4360 (44) are not handled as mutually exclusive, but they are
- Guideline 4395 (50) false negatives when using “..” operator without leading space in for loops
- Guideline 5060 (56) false positives if more than one exception is defined in an exception handler
- Guideline 7110 (60) does not detect missing named notation when calling program units with a single parameter
- Guideline 7130 (62) false positives and false negatives in various cases
- single_table_insert with values_clause leads to parse errors in SQL scripts if terminated by slash instead of semicolon
- greater equal (>=) and less equal (<=) are reported as less than (<)
- Notes:
- The intermediate XML file format is different and not compatible to version 1. You therefore cannot use version 1 of PL/SQL Cop for SonarQube. You have to upgrade PL/SQL Cop for SonarQube to version 2 as well.
PL/SQL Cop v1.0.21
- Released on 2016-12-16
- Extended grammar to support additional keyword PERIOD, e.g. as variable name
- Extended grammar to support keywords as measure_column of a cell_assignment in the model_clause
PL/SQL Cop v1.0.20
- Released on 2016-09-05
- Fixed grammar to support inline views as target of a MERGE statement (undocumented)
- Fixed grammar to support
ASC
|DESC
andNULLS
FIRST
|LAST
in row_pattern_order_by clause (undocumented)