db* CODECOP v4.5.0
New / Changed
Common
- Consider function definitions in package spec and object type spec not considered for "Number of Functions" metric (Azure DevOps 65459)
Validators
- Do not report G-8210 violations for views owned by SYS (#18)
- Configure guidelines via System properties (Azure DevOps 65421)
cop.1050.threshold
: Default2
. Defines the threshold (less than) before a G-1050 violation is reported.cop.2185.threshold
: Default4
. Defines the threshold (less than) before a G-2185 violation is reported.cop.2410.boolean.strings
: Default:true, false, t, f, 0, 1, 2, yes, no, y, n, ja, nein, j, si, s, oui, non, o, l_true, l_false, co_true, co_false, co_numeric_true, co_numeric_false
. Defines the literals that represent a boolean value to identify violations of G-2410.cop.5050.threshold.from
: Default20000
. Defines the lower bound of an error number (greater or equal than, positive value) in guideline G-5050cop.5050.threshold.to
: Default20999
. Defines the upper bound of an error number (less or equal than, positive value) in guideline G-5050cop.7210.threshold
: Default:2000
. Defines the threshold (less than) before a G-7210 violation is reported.- Define constant remediation cost per issue for all guidelines (Azure DevOps 65461)
- 1 Minute, easy, can be done mechanically e.g. via refactoring support in the IDE (rename local variable)
- 5 Minutes, local change, but needs some simple other tasks (understanding code, lookup alternatives in the manual, etc.)
- 10 Minutes, local or distributed change, might need a bit more work/analysis, e.g. rewrite query to ANSI SQL-92 join syntax or identifying loose or dense arrays
- 60 Minutes, requires logic and or structure change, e.g. storing PK columns instead of ROWIDs
Fixed
Common
- Invalid JSON format produced in tvdcc_report.json when the message contains double quotes (#24)
Grammars (plsql)
-
Parse error when using table function in using_clause auf merge statement (Azure DevOps 68619)
Using a table function as in the following example is not documented
merge into t using f() s on (t.id = s.id) when matched then update set t.c1 = s.c1;
This fix caused a change in the underlying model. Validators using the
usingClause.getTable()
need to use nowusingClause.getQte().getQteName()
to access the table name in the using_clause of the merge statement. See also Trivadis/plsql-cop-validators@1cf838f
Validators
- False positive for G-7430 in functions when the declare section contains other functions (#15)
- False positive for G-6020 when dynamic SQL is not an INSERT, UPDATE or DELETE statement (#16)
- Duplicate issues for G-7430 in standalone functions (#15)
- Highlighting the area of G-7460 violations is too extensive for standalone functions (#17)
- False positive for G-3120 when using star
*
(#19) - False positive for G-3183 when using table alias or table (#26)