Closed SiShaman closed 3 years ago
The bad example in https://trivadis.github.io/plsql-and-sql-coding-guidelines/v4.0/4-language-usage/2-variables-and-types/1-general/g-2110/ throws a violation.
To reduce false positives (e.g. for user defined data types) only some chosen data types are considered for the check. Currently:
The rule makes most sense for data types that allow a scale/precision.
Thanks for the very rapid response. Would you entertain the possibility of adding integer to that list if I submitted an enhancement request or is the decision to focus on the "sizable" types pretty fixed at this point?
Nothing is fixed. You have to convince us that it is a good idea. I suggest to contact toolbox@trivadis.com regarding the enhancement request. Thank you.
And if you do not like the default behavior, you have always the option to override the behavior of a validator check. However, this feature is only available for customers with a PL/SQL Cop license.
My employer does have a license, so we may look into that route. Thank you again for your time.
Question is answered.
I was fiddling around with the command-line version of PL/SQL Cop and some older code, and surprised to not see G-2110 raised for several variables. After further experimentation I worked out that it just doesn't seem to apply to variables declared as INTEGER and I was wondering why. No obvious answer is coming to mind or presenting itself through Google searches on what might be "special" about Oracle's integer type.