Skip to content

Commit 9d2d2f5

Browse files
committed
Fix #78 - Added paragraph explaining that exceptions to Rule G-1050 exist (like Logger)
1 parent 93abd1b commit 9d2d2f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/4-language-usage/1-general/g-1050.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Literals are often used more than once in your code. Having them defined as a co
99

1010
All constants should be collated in just one package used as a library. If these constants should be used in SQL too it is good practice to write a deterministic package function for every constant.
1111

12+
In specific situations this rule could lead to an extreme plethora of constants, for example if you use Logger like `logger.append_param(p_params =>l_params, p_name => 'p_param1_todo', p_val => p_param1_todo);`, where the value for `p_name` always should be the name of the variable that is passed to `p_val`. For such cases it would be overkill to add constants for every single variable name you are logging, so if you use Logger or similar, consider making that an exception to the rule, just document exactly which exceptions you will allow and stick to them.
13+
1214
## Example (bad)
1315

1416
``` sql

0 commit comments

Comments
 (0)