Skip to content

db* CODECOP v4.4.0

Compare
Choose a tag to compare
@PhilippSalvisberg PhilippSalvisberg released this 04 Oct 17:57
· 4 commits to main since this release

New / Changed

Common

Validators

  • All validator checks are based on PL/SQL & SQL Coding Guidelines Version 4.3.
  • New guidelines, applicable in an Oracle Database 23c only:
    • G-3182: Always specify column names instead of positional references in GROUP BY clauses.
    • G-3183: Always specify column aliases instead of expressions in GROUP BY clauses.
  • Updated guideline G-1050: Avoid using literals in your code.
    • An issue reported only when the threshold number per literal is reached.
    • The default threshold is 2, this means no issue is reported if a literal is used once within a file.
    • The default threshold can be overridden via the Java system property cop.1050.threshold.
  • Updated guideline G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit.
    • Violations are reported only when the parameter type contains char, dec, interval, number, numeric, %type.
    • For these data types the length is not defined and therefore assigning it to a size limited variable makes sense.
    • However, for %type definitions there are still false positives possible when the underlying data type does not contain a size limiting component.
    • %type definitions cannot be resolved with static code analysis based on a single file scope.
  • Updated severity (blocker, critical, major, minor, info) of most guidelines.
    • Assessing the maintenance cost leads to a severity between info and critical, but never blocker.
    • If a violation of an issue may impact the resource usage (CPU, memory, runtime performance) the severity is at least critical.
    • If a violation of an issue may lead to an incorrect result or a runtime exception the severity is defined as blocker. The issue is considered a bug.
  • Private methods in validators are declared now as protected to simplify overriding them in custom validators.

Grammars

  • Updated PL/SQL editor plugin for Eclipse.

Fixed

Grammars

  • Parse error when using overriding in a map member function in type body

Validators