Skip to content

Commit bf1bd97

Browse files
update genmode based on tvdcc-4.2.1
1 parent ace903e commit bf1bd97

File tree

2 files changed

+174
-96
lines changed

2 files changed

+174
-96
lines changed

src/main/resources/TrivadisGuidelines3Plus/genmodel/plsqlcop-model.xml

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<txt>mn</txt>
107107
</prop>
108108
</chc>
109-
<!-- Always use a format model in string to date/time conversion functions. (not implemented) -->
109+
<!-- Always use a format model in string to date/time conversion functions. -->
110110
<chc>
111111
<rule-repo>trivadis</rule-repo>
112112
<rule-key>G-9010</rule-key>
@@ -125,7 +125,7 @@
125125
<txt>mn</txt>
126126
</prop>
127127
</chc>
128-
<!-- Try to use a format model and NLS_NUMERIC_CHARACTERS in string to number conversion functions. (not implemented) -->
128+
<!-- Try to use a format model and NLS_NUMERIC_CHARACTERS in string to number conversion functions. -->
129129
<chc>
130130
<rule-repo>trivadis</rule-repo>
131131
<rule-key>G-9020</rule-key>
@@ -148,7 +148,7 @@
148148
<chc>
149149
<key>LOGIC_CHANGEABILITY</key>
150150
<name>Logic changeability</name>
151-
<!-- Never use self-defined weak ref cursor types. (not implemented) -->
151+
<!-- Never use self-defined weak ref cursor types. -->
152152
<chc>
153153
<rule-repo>trivadis</rule-repo>
154154
<rule-key>G-2610</rule-key>
@@ -194,7 +194,7 @@
194194
<chc>
195195
<key>CPU_EFFICIENCY</key>
196196
<name>Cpu efficiency</name>
197-
<!-- Avoid assigning values to local variables that are not used by a subsequent statement. (not implemented) -->
197+
<!-- Avoid assigning values to local variables that are not used by a subsequent statement. -->
198198
<chc>
199199
<rule-repo>trivadis</rule-repo>
200200
<rule-key>G-2135</rule-key>
@@ -232,7 +232,7 @@
232232
<txt>mn</txt>
233233
</prop>
234234
</chc>
235-
<!-- Never commit within a cursor loop. (not implemented) -->
235+
<!-- Never commit within a cursor loop. -->
236236
<chc>
237237
<rule-repo>trivadis</rule-repo>
238238
<rule-key>G-3310</rule-key>
@@ -270,6 +270,25 @@
270270
<txt>mn</txt>
271271
</prop>
272272
</chc>
273+
<!-- Never use RETURN in package initialization block. -->
274+
<chc>
275+
<rule-repo>trivadis</rule-repo>
276+
<rule-key>G-7250</rule-key>
277+
<prop>
278+
<key>remediationFunction</key>
279+
<txt>LINEAR_OFFSET</txt>
280+
</prop>
281+
<prop>
282+
<key>remediationFactor</key>
283+
<val>1.0</val>
284+
<txt>mn</txt>
285+
</prop>
286+
<prop>
287+
<key>offset</key>
288+
<val>5.0</val>
289+
<txt>mn</txt>
290+
</prop>
291+
</chc>
273292
<!-- Try to define your packaged/standalone function deterministic if appropriate. -->
274293
<chc>
275294
<rule-repo>trivadis</rule-repo>
@@ -289,7 +308,7 @@
289308
<txt>mn</txt>
290309
</prop>
291310
</chc>
292-
<!-- Avoid multiple DML events per trigger if primary key is assigned in trigger. (not implemented) -->
311+
<!-- Avoid multiple DML events per trigger if primary key is assigned in trigger. -->
293312
<chc>
294313
<rule-repo>trivadis</rule-repo>
295314
<rule-key>G-7730</rule-key>
@@ -666,7 +685,7 @@
666685
<txt>mn</txt>
667686
</prop>
668687
</chc>
669-
<!-- Avoid using the same expression on both sides of a relational comparison operator or a logical operator. (not implemented) -->
688+
<!-- Avoid using the same expression on both sides of a relational comparison operator or a logical operator. -->
670689
<chc>
671690
<rule-repo>trivadis</rule-repo>
672691
<rule-key>G-1080</rule-key>
@@ -704,7 +723,7 @@
704723
<txt>mn</txt>
705724
</prop>
706725
</chc>
707-
<!-- Never self-assign a variable. (not implemented) -->
726+
<!-- Never self-assign a variable. -->
708727
<chc>
709728
<rule-repo>trivadis</rule-repo>
710729
<rule-key>G-2145</rule-key>
@@ -742,7 +761,7 @@
742761
<txt>mn</txt>
743762
</prop>
744763
</chc>
745-
<!-- Try to move transactions within a non-cursor loop into procedures. (not implemented) -->
764+
<!-- Try to move transactions within a non-cursor loop into procedures. -->
746765
<chc>
747766
<rule-repo>trivadis</rule-repo>
748767
<rule-key>G-3320</rule-key>
@@ -761,7 +780,7 @@
761780
<txt>mn</txt>
762781
</prop>
763782
</chc>
764-
<!-- Avoid using identical conditions in different branches of the same IF or CASE statement. (not implemented) -->
783+
<!-- Avoid using identical conditions in different branches of the same IF or CASE statement. -->
765784
<chc>
766785
<rule-repo>trivadis</rule-repo>
767786
<rule-key>G-4250</rule-key>
@@ -780,7 +799,7 @@
780799
<txt>mn</txt>
781800
</prop>
782801
</chc>
783-
<!-- Avoid inverting boolean conditions with NOT. (not implemented) -->
802+
<!-- Avoid inverting boolean conditions with NOT. -->
784803
<chc>
785804
<rule-repo>trivadis</rule-repo>
786805
<rule-key>G-4260</rule-key>
@@ -799,7 +818,7 @@
799818
<txt>mn</txt>
800819
</prop>
801820
</chc>
802-
<!-- Avoid comparing boolean values to boolean literals. (not implemented) -->
821+
<!-- Avoid comparing boolean values to boolean literals. -->
803822
<chc>
804823
<rule-repo>trivadis</rule-repo>
805824
<rule-key>G-4270</rule-key>
@@ -1050,7 +1069,7 @@
10501069
<txt>mn</txt>
10511070
</prop>
10521071
</chc>
1053-
<!-- Avoid self-assigning a column. (not implemented) -->
1072+
<!-- Avoid self-assigning a column. -->
10541073
<chc>
10551074
<rule-repo>trivadis</rule-repo>
10561075
<rule-key>G-3115</rule-key>
@@ -1107,7 +1126,7 @@
11071126
<txt>mn</txt>
11081127
</prop>
11091128
</chc>
1110-
<!-- Always use wildcards in a LIKE clause. (not implemented) -->
1129+
<!-- Always use wildcards in a LIKE clause. -->
11111130
<chc>
11121131
<rule-repo>trivadis</rule-repo>
11131132
<rule-key>G-3195</rule-key>
@@ -1202,7 +1221,7 @@
12021221
<txt>mn</txt>
12031222
</prop>
12041223
</chc>
1205-
<!-- Never reuse labels in inner scopes. (not implemented) -->
1224+
<!-- Never reuse labels in inner scopes. -->
12061225
<chc>
12071226
<rule-repo>trivadis</rule-repo>
12081227
<rule-key>G-4325</rule-key>
@@ -1354,7 +1373,7 @@
13541373
<txt>mn</txt>
13551374
</prop>
13561375
</chc>
1357-
<!-- Always use FORMAT_ERROR_BACKTRACE when using FORMAT_ERROR_STACK or SQLERRM. (not implemented) -->
1376+
<!-- Always use FORMAT_ERROR_BACKTRACE when using FORMAT_ERROR_STACK or SQLERRM. -->
13581377
<chc>
13591378
<rule-repo>trivadis</rule-repo>
13601379
<rule-key>G-5080</rule-key>
@@ -1373,7 +1392,7 @@
13731392
<txt>mn</txt>
13741393
</prop>
13751394
</chc>
1376-
<!-- Always use CREATE OR REPLACE instead of CREATE alone. (not implemented) -->
1395+
<!-- Always use CREATE OR REPLACE instead of CREATE alone. -->
13771396
<chc>
13781397
<rule-repo>trivadis</rule-repo>
13791398
<rule-key>G-7125</rule-key>
@@ -1449,7 +1468,7 @@
14491468
<txt>mn</txt>
14501469
</prop>
14511470
</chc>
1452-
<!-- Always assign values to OUT parameters. (not implemented) -->
1471+
<!-- Always assign values to OUT parameters. -->
14531472
<chc>
14541473
<rule-repo>trivadis</rule-repo>
14551474
<rule-key>G-7330</rule-key>
@@ -1525,7 +1544,7 @@
15251544
<txt>mn</txt>
15261545
</prop>
15271546
</chc>
1528-
<!-- Never use multiple UPDATE OF in trigger event clause. (not implemented) -->
1547+
<!-- Never use multiple UPDATE OF in trigger event clause. -->
15291548
<chc>
15301549
<rule-repo>trivadis</rule-repo>
15311550
<rule-key>G-7720</rule-key>
@@ -1563,7 +1582,7 @@
15631582
<txt>mn</txt>
15641583
</prop>
15651584
</chc>
1566-
<!-- Try to define a default value on conversion errors. (not implemented) -->
1585+
<!-- Try to define a default value on conversion errors. -->
15671586
<chc>
15681587
<rule-repo>trivadis</rule-repo>
15691588
<rule-key>G-9030</rule-key>
@@ -2421,7 +2440,7 @@
24212440
<txt>mn</txt>
24222441
</prop>
24232442
</chc>
2424-
<!-- Always use DEFAULT ON NULL declarations to assign default values to table columns if you refuse to store NULL values. -->
2443+
<!-- Always use DEFAULT ON NULL declarations to assign default values to table columns if you refuse to store NULL values. (not implemented) -->
24252444
<chc>
24262445
<rule-repo>trivadis</rule-repo>
24272446
<rule-key>G-3170</rule-key>
@@ -2459,7 +2478,7 @@
24592478
<txt>mn</txt>
24602479
</prop>
24612480
</chc>
2462-
<!-- Never use ROWNUM at the same query level as ORDER BY. (not implemented) -->
2481+
<!-- Never use ROWNUM at the same query level as ORDER BY. -->
24632482
<chc>
24642483
<rule-repo>trivadis</rule-repo>
24652484
<rule-key>G-3185</rule-key>

0 commit comments

Comments
 (0)